After upgrading to 11.04, vsftpd needs to be reconfigured. Review the vsftpd configuration, especially the user configuration.
I. Basic Configuration:
Listen = Yes
Anonymous_enable = no anonymous login not allowed
Local_enable = Yes allow local users to log on
Write_enable = Yes allow local users to modify and delete
Local_umask = 022 FTP File Upload permission. The default value is 077.
Dirmessage_enable = yes. When the directory is switched, the message contents of the hidden files under the directory are displayed.
Xferlog_enable = yes. Logs uploaded and downloaded are activated.
Connect_from_port_20 = Yes
Chroot_local_user = Yes
Local_root =/Data
# Configure the Local Users Allowed to log on, one line for each user
Userlist_enable = Yes
Userlist_file =/etc/vsftpd. user_list
Userlist_deny = No
Secure_chroot_dir =/var/run/vsftpd/
Pam_service_name = vsftpd
Rsa_cert_file =/etc/SSL/private/vsftpd. pem
Ii. User Configuration
Vsftpd can be configured in three ways,Anonymous,Local user(Users with accounts on the host to which the FTP server belongs. In vsftpd, such users are local users, which are equivalent to real users on other FTP servers ),Virtual user(For FTP service users, virtual users can only access FTP Server resources. You only need to have read and write permissions on the system through FTP ). A virtual user uses a separate user name/password for saving, and can use database files or database servers for saving. Because of the simple requirements and a small number of users, the local user mode can better meet the requirements after configuring local user permissions.
Create a vsftpd user (useradd -- home/vsftpd -- GID nogroup-M -- shell/bin/false vsftpd)
Create data users (uploaded by users) and add them to the vsftpd group. Share users (used for download) and personal users XXX are not included in the vsftpd group. Data User Home is/data, share user home is/home/share, and XXX User Home is/home/xxx.
Set the FTP root directory/data owner to vsftpd: vsftpd and the attribute to 775, that is, the same group can be read and written, and other readable.
Set the owner of/data/user/xxx to XXX: XXX and the attribute to 711. In this way, non-xxx users cannot read or write the directory.
3. Related Links
Can I enable Anonymous Users in vsftp while using virtual users?
Vsftpd configuration Manual
Ubuntu 9.04 vsftpd + MySql