vsftp相关配置文件
1.sudo gedit /etc/init.d/rc.local #! /bin/sh **mount –bind /media/sda5/software/ /home/ftp/winsoft mount –bind /media/sda6/music/ /home/ftp/music/ mount –bind /media/sda6/movies/ /home/ftp/movies/ mount –bind /media/sda7/linux/ /home/ftp/linux/ mount –bind /media/sda7/games/ /home/ftp/games/ mount –bind /media/sda6/var/ /home/ftp/var/ ** PATH=/sbin:/bin:/usr/sbin:/usr/bin [ -f /etc/default/rcS ] && . /etc/default/rcS . /lib/lsb/init-functions do_start() { if [ -x /etc/rc.local ]; then log_begin_msg “Running local boot scripts (/etc/rc.local)” /etc/rc.local log_end_msg $? fi } case “$1” in start) do_start ;; restart|reload|force-reload) echo “Error: argument ‘$1’ not supported” >&2 exit 3 ;; stop) ;; *) echo “Usage: $0 start|stop” >&2 exit 3 ;; esac
##################################################################
2 .sudo gedit /etc/vsftpd.conf
Example config file /etc/vsftpd.conf
listen=YES
#listen_ipv6=YES
anonymous_enable=YES anon_root=/home/ftp #a匿名用户登录时目录,默认为/home/ftp
local_enable=YES #local_root=/home/ftp #本地用户登录时目录
write_enable=YES
#local_umask=022
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
#chown_uploads=YES #chown_username=whoever
#xferlog_file=/var/log/vsftpd.log
#xferlog_std_format=YES
#idle_session_timeout=600
#data_connection_timeout=120
#nopriv_user=ftpsecure
#async_abor_enable=YES
#ascii_upload_enable=YES #ascii_download_enable=YES # dirmessage_enable=YES
You may fully customise the login banner string:
ftpd_banner=Welcome to blah FTP service.
#deny_email_enable=YES
(default follows)
#banned_email_file=/etc/vsftpd.banned_emails
chroot_local_user=YES
#chroot_list_enable=YES
(default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#ls_recurse_enable=YES
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem #
This option specifies the location of the RSA key to use for SSL
encrypted connections.
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
########################encoding patch #setting######################## charset_filter_enable=YES charset_client=gbk charset_server=UTF8