#Example config file /etc/vsftpd/vsftpd.conf # Thedefault compiled in settings are fairly paranoid. This sample file #loosens things up a bit, to make the ftp daemon more usable. #Please see vsftpd.conf.5 forall compiled in defaults. # READTHIS: This example file is NOT an exhaustive list of vsftpd options. #Please read the vsftpd.conf.5 manualpage to get a full idea of vsftpd's #capabilities. #Allow anonymous FTP (Beware - allowed by default if you comment this out). anonymous_enable=YES ( 是否允許 匿名登錄FTP 服務器,默認設置為YES 允許,即用戶可使用用戶名ftp 或anonymous 進行ftp登錄,口令為用戶的E-mail 地址。如不允許匿名訪問去掉前面#并設置為NO ) #Uncomment this to allow local users to log in. local_enable=YES (是否允許本地用戶 ( 即 linux 系統中的用戶帳號) 登錄FTP服務器,默認設置為YES允許, 本地用戶登錄后會進入用戶主目錄,而匿名用戶登錄后進入匿名用戶的下載目錄/var/ftp/pub ;若只允許匿名用戶訪問,前面加上#,可 阻止本地用戶訪問FTP 服務器。) #Uncomment this to enable any form of FTP write command. write_enable=YES ( 是否允許本地用戶對 FTP 服務器文件具有寫權限 , 默認設置為 YES 允許 ) #Default umask for local users is 077. You may wish to change this to 022, # ifyour users expect that (022 is used by most other ftpd's) # local_umask=022 (或其它值,設置本地用戶的文件掩碼 為缺省022,也可根據個人喜好將其設置為其他值,默認值為077) #Uncomment this to allow the anonymous FTP user to upload files. This only # hasan 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 ( 是否允許匿名用戶上傳文件 , 須將 write_enable=YES , 默認設置為 YES 允許 ) #Uncomment this if you want the anonymous FTP user to be able to create # newdirectories. #anon_mkdir_write_enable=YES ( 是否允許匿名用戶創建新文件夾 , 默認設置為 YES 允許 ) #Activate directory messages - messages given to remote users when they # gointo a certain directory. #dirmessage_enable=YES ( 是否激活目錄歡迎信息功能 , 當用戶用 CMD模式首次訪問服務器上某個目錄時 ,FTP 服務器將顯示歡迎信息 , 默認情況下 , 歡迎信息是通過 該 目錄下的 .message 文件獲得的,此文件保存自定義的歡迎信息,由用戶自己建立) #Activate logging of uploads/downloads. xferlog_enable=YES ( 默認值為 NO 如果啟用此選項,系統將會維護記錄服務器上傳和下載情況的日志文件,默認情況該日志文件為/var/log/vsftpd.log, 也可以通過下面的 xferlog_file 選項對其進行設定。) # Makesure PORT transfer connections originate from port 20 (ftp-data). connect_from_port_20=YES ( 設定 FTP 服務器將啟用 FTP 數據端口的連接請求 ,ftp-data 數據傳輸 ,21 為連接控制端口 ) # Ifyou want, you can arrange for uploaded anonymous files to be owned by # adifferent user. Note! Using "root" for uploaded files is not #recommended!-注意,不推薦使用 root 用戶上傳文件 #chown_uploads=YES ( 設定是否允許 改變 上傳文件的屬主 , 與下面一個設定項配合使用 ) #chown_username=whoeve r ( 設置想要改變的上傳文件的屬主 , 如果需要 , 則輸入一個系統用戶名 , 例如可以把上傳的文件都改成 root 屬主。whoever :任何人) # Youmay override where the log file goes if you like. The default is shown #below. #xferlog_file=/var/log/vsftpd.log ( 設定系統維護記錄FTP 服務器上傳和下載情況的日志文件,/var/log/vsftpd.log 是默認的,也可以另設其它) # Ifyou want, you can have your log file in standard ftpd xferlog format #xferlog_std_format=YES ( 如果啟用此選項 , 傳輸日志文件將以標準 xferlog 的格式書寫,該格式的日志文件默認為/var/log/xferlog,也可以通過xferlog_file 選項對其進行設定,默認值為NO) #dual_log_enable ( 如果添加并啟用此選項,將生成兩個相似的日志文件,默認在/var/log/xferlog和/var/log/vsftpd.log 目錄下。前者是wu_ftpd類型的傳輸日志,可以利用標準日志工具對其進行分析;后者是vsftpd 類型的日志) #syslog_enable ( 如果添加并啟用此選項,則原本應該輸出到/var/log/vsftpd.log 中的日志,將輸出到系統日志中) # Youmay change the default value for timing out an idle session. #idle_session_timeout=600 (設置數據傳輸中斷間隔時間,此語句表示空閑的用戶會話中斷時間為600秒,即當數據傳輸結束后,用戶連接FTP服務器的時間不應超過600秒,可以根據實際情況對該值進行修改) # Youmay change the default value for timing out a data connection. #data_connection_timeout=120 ( 設置數據連接超時時間 , 該語句表示數據連接超時時間為 120 秒 , 可根據實際情況對其個修改 ) # Itis recommended that you define on your system a unique user which the # ftpserver can use as a totally isolated and unprivileged user. #nopriv_user=ftpsecure ( 運行 vsftpd 需要的非特權系統用戶,缺省是nobody ) #Enable this and the server will recognise asynchronous ABOR requests. Not #recommended for security (the code is non-trivial). Not enabling it, #however, may confuse older FTP clients. #async_abor_enable=YES ( 如果 FTPclient 會下達“async ABOR ”這個指令時,這個設定才需要啟用,而一般此設定并不安全,所以通常將其取消) # Bydefault the server will pretend to allow ASCII mode but in fact ignore # therequest. Turn on the below options to have the server actually do ASCII #mangling on files when in ASCII mode. #Beware that on some FTP servers, ASCII support allows a denial of service #attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd #predicted this attack and has always been safe, reporting the size of the # rawfile. #ASCII mangling is a horrible feature of the protocol. #ascii_upload_enable=YES ( 大多數 FTP 服務器都選擇用 ASCII 方式傳輸數據 , 將 # 去掉就能實現用 ASCII 方式上傳和下載文件 ) #ascii_download_enable=YES ( 將 # 去掉就能實現用 ASCII 方式下載文件 ) # Youmay fully customise the login banner string: #ftpd_banner=Welcome to blah FTP service. (將#去掉可設置登錄FTP服務器時顯示的歡迎信息,可以修改=后的歡迎信息內容。另外如在需要設置更改目錄歡迎信息的目錄下創建名為 .message 的文件,并寫入歡迎信息保存后,在進入到此目錄會顯示自定義歡迎信息 ) # Youmay specify a file of disallowed anonymous e-mail addresses. Apparently #useful for combatting certain DoS attacks. #deny_email_enable=YES ( 可將某些特殊的 email address 抵擋住。如果以anonymous 登錄服務器時,會要求輸入密碼,也就是您的email address, 如果很討厭某些email address ,就可以使用此設定來取消他的登錄權限,但必須與下面的設置項配合 ) #(default follows) #banned_email_file=/etc/vsftpd/banned_emails (當上面的 deny_email_enable=YES 時,可以利用這個設定項來規定那個email address 不可登錄vsftpd 服務器,此文件需用戶自己創建,一行一個email address 即可! ) # Youmay specify an explicit list of local users to chroot() to their home #directory. If chroot_local_user is YES, then this list becomes a list of #users to NOT chroot(). #chroot_list_enable=YES ( 設置為 NO 時,用戶登錄FTP 服務器后具有訪問自己目錄以外的其他文件的權限, 設置為 YES 時 , 用戶被鎖定在自己的 home 目錄中,vsftpd 將在下面 chroot_list_file 選項值的位置尋找 chroot_list 文件,此文件需用戶建立, 再將需鎖定在自己home 目錄的用戶列入其中,每行一個用戶) #(default follows) #chroot_list_file=/etc/vsftpd/chroot_list ( 此文件需自己建立 , 被列入此文件的用戶 , 在登錄后將不能切換到自己目錄以外的其他目錄 , 由 FTP 服務器自動地 chrooted 到用戶自己的home 目錄下,使得 chroot_list 文件中的用戶不能隨意轉到其他用戶的FTP home 目錄下,從而有利于FTP 服務器的安全管理和隱私保護) # Youmay activate the "-R" option to the builtin ls. This is disabled by #default to avoid remote users being able to cause excessive I/O on large #sites. However, some broken FTP clients such as "ncftp" and"mirror" assume # thepresence of the "-R" option, so there is a strong case for enablingit. #ls_recurse_enable=YES ( 是否允許遞歸查詢 , 大型站點的 FTP 服務器啟用此項可以方便遠程用戶查詢 ) # When"listen" directive is enabled, vsftpd runs in standalone mode and #listens on IPv4 sockets. This directive cannot be used in conjunction # withthe listen_ipv6 directive. listen=YES ( 如果設置為 YES , 則 vsftpd 將以獨立模式運行,由vsftpd 自己監聽和處理連接請求) # Thisdirective enables listening on IPv6 sockets. To listen on IPv4 and IPv6 #sockets, you must run two copies of vsftpd whith two configuration files. # Makesure, that one of the listen options is commented !! #listen_ipv6=YES ( 設定是否支持IPV6) #pam_service_name=vsftpd ( 設置 PAM 外掛模塊提供的認證服務所使用的配置文件名 ,即/etc/pam.d/vsftpd 文件,此文件中file=/etc/vsftpd/ftpusers字段,說明了PAM 模塊能抵擋的帳號內容來自文件/etc/vsftpd/ftpusers中) #userlist_enable=YES/NO (此選項默認值為NO , 此時ftpusers 文件中的用戶禁止登錄FTP 服務器;若此項設為YES ,則 user_list 文件中的用戶允許登錄 FTP 服務器,而如果同時設置了 userlist_deny=YES ,則 user_list 文件中的用戶將不允許登錄FTP 服務器,甚至連輸入密碼提示信息都沒有,直接被FTP 服務器拒絕) #userlist_deny=YES/NO (此項默認為YES ,設置是否阻扯user_list 文件中的用戶登錄FTP 服務器) |