- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2019-07-06T11:10:08+09:00","default:dramsukohome","dramsukohome")
#author("2023-01-21T09:54:05+09:00","default:dramsukohome","dramsukohome")
[[Linux]]~
#shadowheader(1,ftp proftp);
#shadowheader(2,目次);
#contents
* 基本的なこと [#zff7a10e]
** ユーザー追加 [#h052b204]
- ftpasswd --file /etc/ftpd.passwd --passwd --name hogehoge --uid 500 -gid 105 --home (共有fullpath) --shell /bin/bash
** ユーザー削除 [#h052b204]
- ftpasswd --file /etc/ftpd.passwd --passwd -delete-user --name USERNAME --uid 500 -gid 100 --home /home/USERNAME --shell /bin/sh
** PASV mode 設定 [#z05e900b]
-NATルータ越えで、PASVモードを使用する場合~
または、「"PASV" 227 -」 のエラーが出る場合
-sudo vi /etc/proftpd.conf
-下記を追加
MasqueradeAddress tar3.net
MasqueradeAddress servername.tar3.net
PassivePorts 4000 4029
* 設定,conf [#ld0acd4c]
- sudo vi /etc/proftpd.conf
** 基本設定 [#o95da674]
ServerName "FTP server name"
ServerType standalone
ServerIdent on "FTP Server ready."
ServerAdmin hogehoge@hoge.com
DefaultServer on
** default root [#v7ee420a]
- 書式「DefaultRoot path名 ユーザー名(グループ名)」
- ! は not の意味
DefaultRoot /var/www/html hogeGroupName
DefaultRoot /var/www/ !hogeGroupName
** User, Group [#b62bf822]
- default のまま
User nobody
Group nobody
** MaxInstances [#nf771cfe]
- 適当に設定
MaxInstances 20
** SyslogLevel [#f8734e57]
- お好みで
SyslogLevel info
** MaxLoginAttempts [#j3179a2d]
-何回までログイン失敗を許すか
MaxLoginAttempts 5
** umask, AllowOverwrite [#sbe6665f]
-お好みで
Umask 002
# Allow users to overwrite files and change permissions
AllowOverwrite yes
<Limit ALL SITE_CHMOD>
AllowAll
</Limit>
* ldap 連携 [#ec237d83]
** ldap module のインストール [#z207c089]
sudo yum install proftpd-ldap
** /etc/proftpd.conf の編集 [#q9b57632]
-コメントを取る
--before
#LoadModule mod_ldap.c
--after
LoadModule mod_ldap.c
-ldap関連の設定
LDAPServer 123.456.789.123:389
LDAPAuthBinds on
LDAPBindDN "cn=administrator,dc=hogehoge,dc=net" "password"
LDAPUsers "dc=hogehoge,dc=net" "(uid=%u)"
LDAPGroups "dc=hogehoge,dc=net" "(&(gidNumber=%v)(status=valid))"
LDAPSearchScope subtree
* Trouble関連 [#e1f6d7ff]
** ファイルをアップロードできない。 [#v1611a86]
-ローカルのファイルを右クリック、「アップロード」を選択するとアップロードできた。(Drag and Dropではできなかった)