ProFTPDのインストール

http://www.proftpd.org/

./configure \
–enable-openssl \

make

make install

cp ./contrib/dist/rpm/proftpd.init.d /etc/rc.d/init.d/proftpd

chmod 755 /etc/rc.d/init.d/proftpd

chkconfig proftpd on

————————————————————
SSL TSL
————————————————————

yum install libcap-devel openssl-devel

./configure \
–enable-openssl \
–with-modules=mod_sftp:mod_tls \
–with-pic \
–disable-ipv6 \

make

make install

cp ./contrib/dist/rpm/proftpd.init.d /etc/rc.d/init.d/proftpd

chmod 755 /etc/rc.d/init.d/proftpd

chkconfig proftpd on

————————————————————
時間がずれる
————————————————————

confに以下を書いておく
TimesGMT off
SetEnv TZ JST-9

もしくは

vi /etc/rc.d/init.d/proftpd

以下を記述しておくと直る。

export TZ=JST-9

PATH=”$PATH:/usr/local/sbin”
export TZ=JST-9

————————————————————
proftpd.confの設定
————————————————————
rpmでインストールしたものは

/etc/proftpd/proftpd.conf に設置される。

/etc/ftpusers

このファイルはログインさせないアカウントを記述してある
「#」でコメントすれば、ログイン可能になる。

手動でコンパイルしたものは

/usr/local/etc/proftpd.conf に設置される。

————————————————–

ServerName “ProFTPD Default Installation”
ServerType standalone
DefaultServer on
RootLogin on
ListOptions “-a”
UseReverseDNS off
IdentLookups off
TimeoutIdle 1800
TimeoutStalled 1800
TimeoutNoTransfer 1800
TimesGMT off
SetEnv TZ JST-9
PassivePorts 49152 65534
SystemLog /var/log/proftpd.log
ExtendedLog /var/log/proftpd.log

中略

#コメントしないとFTPからパーミッション変更できません
#<Limit SITE_CHMOD>
# DenyAll
#<//Limit>

以下略

————————————————–
ログイン先の指定、制限
————————————————–
testというユーザーに制限を掛ける場合。

ユーザーディレクトリ無しでアカウントを作成。
useradd -M test

test以外はユーザーディレクトリより上には行けない
DefaultRoot ~ !test

testというユーザーは「/home/test/public_html/test」にログインし
それより上の階層には行けない。

DefaultRoot /home/test/public_html/test test

————————————————–
TLS
————————————————–


TLSEngine on
RootLogin on
TLSOptions NoSessionReuseRequired
TLSLog /var/log/proftpd_tls.log
#TLSProtocol SSLv3 TLSv1
TLSProtocol SSLv23
TLSCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
TLSRequired off
TLSRSACertificateFile /etc/ssl/server.crt
TLSRSACertificateKeyFile /etc/ssl/server.key
TLSVerifyClient off
TLSRenegotiate none

————————————————–

mkdir /etc/ssl/

openssl req -new -nodes -keyout /etc/ssl/server.key -out /etc/ssl/server.csr

openssl x509 -in /etc/ssl/server.csr -out /etc/ssl/server.crt -req -signkey /etc/ssl/server.key -days 3650

————————————————–

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です