It is particularly worth mentioning that there are many things worth learning about in Linux vsftpd. Here we mainly introduce Linux vsftpd, including Linux vsftpd.
1. Install and start Linux vsftpd:
$ Yum install vsftpd and then change/etc/vsftpd. add a line of code at the end of the conf file to enable Linux vsftpd to run in an independent process: listen = yes to enable the vsftp service, you can change $ service vsftpd start (/stop/restart) IN System> Administration> Services to enable port 21 in the Firewall, System> Administration> Firewall, and select FTP, enabled. The ftp service can be accessed anonymously.
2. allow local users on the server to access the server through ftp. Of course, these users can also access the server through SSH ):
First, modify/etc/vsftpd/vsfptd. conf: Find the following line and remove the comment: local_enable = YES. After restarting the service, you can allow local users to access the service. The Authentication method is pam (Pluggable Authentication Module, the corresponding file is located in/etc/pam. d/vsftpd, which is similar to the password required for each update manager in Gnome. You can also modify (pam_service_name) in vsftpd. conf ). However, to restrict access by some local users through ftp, you can modify the configuration file.
In Linux vsftpd. in conf, find and modify it to the following lines. If no lines exist, add them.) The meaning is that only the local users listed in the specified user_list file can be logged on through FTP, A local user not in this list cannot log on:
- userlist_enable=YES
- userlist_deny=NO
- userlist_file=/etc/vsftpd/user_list
If userlist_deny = NO in the second row is changed to userlist_deny = YES, the opposite is true. That is, only local users not in the user_list file are allowed to log on through FTP, the local user in this list is not allowed to log on.
In the above circumstances, the user may not be able to view the directory after login, but can change the Directory and access the root directory "/", the following error occurs: Response: 226 Transfer done (but failed to open directory ). this is because the selinux (Security Enhanced Linux) service is enabled by default in Fedora. To disable this service, modify the/etc/selinux/config file and change SELINUX = enforced to SELINUX = disable, then restart the system.
3. Linux vsftpd prohibits users from changing home directory:
By default, Linux vsftpd specifies the following variable value, which indicates that all local users cannot change home direcotry. For a user named test, the default home direcotry is/home/test/. After the user logs on, the user cannot navigate to the directory at the upper level due to the following settings, in other words, he is locked in his home directory and can only access this directory and Its subdirectories: chroot_local_user = YES
If you only need to control that some users are not locked in the home directory, You need to modify vsftpd. in the conf file, locate and modify the content. This indicates that no user in the/etc/vsftpd/chroot_list file is locked, and other users not in the file are locked:
- chroot_local_user=YES
- chroot_list_enable=YES
- chroot_list_file=/etc/vsftdp/chroot_list
In the preceding settings, if the value of chroot_local_user is changed to NO, the opposite is true. This indicates that all users in the chroot_list file are locked, other users not in this file are not locked.
4. Linux vsftpd provides users with permissions such as modification and deletion.
Modify/etc/vsftpd. conf file, find and remove the following line of comment to grant the user the permission to modify and delete the file: write_enable = YES to grant different permissions to different users after logging on, it requires more complex implementation.
5. log on to the Linux vsftpd command line to view Chinese file garbled characters
Because the default character set in Linux vsftpd is UTF-8, while the default character set in Windows is GBK, garbled characters appear when browsing Chinese files in Windows under linux. If the client is FlashFXP or FileZilla, you can resolve it by setting the character set as a UTF-8 during connection. However, if you log on through the command line, because vsftp does not support character set selection, garbled characters will also appear. For FlashFXP, you must first save the ftp address to the site manager, select the site in the site manager, click Advanced-> character encoding, and select UTF8. For FileZilla, the setting method is similar.
There is no good solution yet, there is a solution is solved by patching, refer to the following documents: http://forum.ubuntu.org.cn/viewtopic.php? F = 54 & t = 28642 & start = 0
6. other server parameter configurations in Linux vsftpd
- Max_clients=5# Set the maximum number of simultaneous logins
- Ftpd_banner=YourWelcome info here. # Set the user's welcome information after Logon
- Ascii_upload_enable=YES# Enable character upload, which may pose security risks
- Ascii_download_enable=YES# Enable character mode download
- Idle_session_timeout=300# Disconnect after idle time exceeds 300 seconds
- Data_connection_timeout=300# The data connection timeout is 300 seconds.
- Xferlog_enable=YES# Enable log upload/download
- Xferlog_file=/Var/log/vsftpd. log # log file storage location
- Dirmessage_enable=YES# Enable directory. message Information
- Access Mode for Linux SVN installation and startup
- Install services in Linux Samba and modify firewall configurations to allow access
- The most basic commands in the Linux mount command
- Configure Linux YUM source settings to use a proxy
- Add Linux smb service to firewall and start automatically