There are many ftpd under Linux, Ubuntu commonly used vsftpd, PROFTPD and PURE-FTPD, the original use is proftpd. But one of the most deadly problems in the first two is the code conversion, which uses UTF-8 encoding by default, and the Windows system uses GBK, This causes the Chinese to be garbled during Windows access. PURE-FTPD can set the client default encoding, and setting it directly to GBK solves the problem. PURE-FTPD's virtual user support is also good, allowing limits on bandwidth, space quotas, and the ability to manage virtual users with their own PURE-PW, as well as MySQL and LDAP. PURE-FTPD also provides FXP protocol and SSL/TLS support, which is a very comprehensive ftpd.
1, installation pure-ftpd:
sudo apt-get install pure c10>-ftpd
PURE-FTPD is not a configuration file but a command-line argument. However, PURE-FTPD also provides wrapper for users who prefer profiles, which can be pure-ftpd-wrapper by man. In the Debian/ubuntu under the wrapper a little difference, is under the/etc/pure-ftpd/conf to set the entry as the file name, the setting value of the item as the contents of the file, if you need to set up CLIENTCHARSET=GBK, create a named " Clientcharset "is a file that contains" GBK ".
About the basic parameter configuration:
Clientcharset = GBK #必设 to prevent Windows logon from appearing garbled in Chinese
Dontresolve = Yes #不解析域名, you can save login time
brokenclientscompatibility = Yes #兼容IE等非标准FTP client
Chrooteveryone = Yes #把所有用户限制在其homedir下
Keepallfiles = Yes #禁止用户删除文件, except in the Trustedgid group
Trustedgid = 1001 #管理员组ftpadmins的GID, allow administrators to delete files
Createhomedir = Yes #当虚拟用户第一次登录时, create homedir automatically
Maxclientsperip = 2 #每个IP限制2个连接
Maxclientsnumber = - #最大并发连接数, the default value is
Maxdiskusage = - Upload is no longer accepted #分区已使用空间超过90%
noanonymous = No #允许匿名登录
Bind =, 8821 #改变端口号
2, set up system users, groups:
   sudo   groupadd   ftpgroup
   sudo   useradd - g   ftpuser - d / dev / null - s / bin / false   ftpuser
sudo mkdir/var/ftp
sudo chmod-R 755/ var / FTP
# #由于这些用户仅用于pure-FTPD, do not need to give login permission, so the shell is designated as/bin/false.##
3. Use PURE-PW to configure support for virtual users:
PURE-PW use is very convenient, form and management system users, just in Useradd, Usermod and so on front plus PURE-PW (virtual user name to follow the operation behind rather than put in the last, this point and useradd, etc.). Anonymous users do not need to be configured separately, so homedir must be specified when creating system user FTP, Homedir of other system users can simply be specified as/dev/null, and Homedir will be specified when creating a virtual user. Create a virtual account below crawler implement Virtual user login
sudo pure - PW   useradd   crawler - u   ftpuser - d / var / ftp
after executing each command, PURE-PW will ask for the password of the account. The homedir specified in the-D option of the parameter does not need to be created beforehand. If you set createhomedir=yes in the configuration, PURE-FTPD automatically creates its homedir when the virtual user logs on for the first time.
When you add a virtual user, you can also set the user's bandwidth, space quotas, IP segments, and so on. Modify the virtual user settings with PURE-PW usermod, modify the password with PURE-PW passwd, delete the virtual user PURE-PW Userdel, usage See official documents
or see: http://www.blogjava.net/sk8boy/archive/2006/04/11/40350.html
4, every time you modify the user settings to update the virtual user database, do not need to restart the service :
sudo pure-pw mkdb
You can also update the virtual user database immediately with the-m parameter every time you use PURE-PW.
Now that the configuration is complete, ftp localhost can log on anonymously, but there is a 530 error in the virtual user login. This is because the default authentication method does not have a puredb database, the workaround is to add a soft link to the Puredb according to the library under/etc/pure-ftpd/auth:
CD etc/pure-ftpd/auth
sudo Ln -s .. /conf/puredb puredb
5. Restart the service:
sudo / etc / Init . D / Pure - ftpd Restart
This article from "Guangzhou, Rain People" blog, please be sure to keep this source http://liulihuan.blog.51cto.com/8018739/1707995
PURE-FTPD build a simple Ubuntu FTP server