2008年7月10日 星期四

架設vsftp

環境:
Server IP:168.168.168.168


設定:
apt-get install vsftpd

vi /etc/vsftpd.conf


# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
.
.
.
# Uncomment this to allow local users to log in.
#local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
#write_enable=YES
.
.
.
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
.
.
.
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
.
.
.
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
.
.
.
# You may restrict local users to their home directories. See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES

To

# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=No #不允許匿名使用者入內
.
.
.
# Uncomment this to allow local users to log in.
local_enable=YES #允許本地使用者登入
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES #允許寫入檔案
.
.
.
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=NO #不允許匿名使用者上傳
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=NO #不允許匿名使用者新增資料夾
.
.
.
# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log #寫入系統日誌
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
data_connection_timeout=120
.
.
.
# You may fully customise the login banner string:
ftpd_banner=Welcome to blah FTP service. #FTP登入歡迎語
.
.
.
# You may restrict local users to their home directories. See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
chroot_local_user=YES #只允許使用者在自已的家目錄中

Add

force_dot_files=NO
listen_address=168.168.168.168 #指定伺服器IP
anon_max_rate=524288 #匿名使用者最大上傳速度
local_max_rate=524288 #使用者最大上傳速度


/etc/init.d/vsftpd restart

沒有留言: