ProFTPd的啟動
一、配置運行ProFTPD的方法
ServerType inetd
# Set the user and group that the server normally runs at.
User nobody
Group nobody
如果ServerType選擇了inetd,/etc/init.d/proftpd start,就會報錯,因為你選擇了inetd運行。
ProFTPd warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration.
若要手動執(zhí)行ProFTPD, 要把 ServerType 設(shè)成 standalone才行。
二、NIS認(rèn)證
/etc/nsswitch.conf 必須有nis服務(wù)
# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
# RequireValidShells off
必須把NIS Sever傳過來的shell信息/usr/local/bin/bash,放在/etc/shells列表才行,否則視為invalid shell。
另外,也可以在/etc/passwd文件中的對應(yīng)shell的那個field直接進(jìn)行修改為/bin/bash,則忽略遠(yuǎn)端傳過來的shell信息。
還有一個很重要的設(shè)置,
# Uncomment this if you are using NIS or LDAP to retrieve passwords:
PersistentPasswd off
PersistentPasswd 如果設(shè)置為on,就只檢查/etc/passwd里面的user account,不要用uncomment,要用上述語句,切記!
三、xinet啟動ProFTPD
- # Set the user and group that the server normally runs at.
- User root
- Group root
建立/etc/xinetd.d/proftpd,然后編輯如下內(nèi)容。
- service ftp
- {
- disable = no
- flags =REUSE
- socket_type = stream
- wait = no
- user = root
- server = /usr/sbin/proftpd
- server_args = -c /etc/proftpd/proftpd.conf
- log_on_success += DURATION USERID
- log_on_failure += USERID
- }
保存之后,chmod +x proftpd
這樣就成功了。
【編輯推薦】