Linux vsftpd installation and startup, and logon under the command line, view Chinese file garbled

Source: Internet
Author: User
Tags filezilla

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:

 
 
  1. userlist_enable=YES 
  2. userlist_deny=NO 
  3. 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:

 
 
  1. chroot_local_user=YES 
  2. chroot_list_enable=YES 
  3. 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

 
 
  1. Max_clients=5# Set the maximum number of simultaneous logins
  2. Ftpd_banner=YourWelcome info here. # Set the user's welcome information after Logon
  3. Ascii_upload_enable=YES# Enable character upload, which may pose security risks
  4. Ascii_download_enable=YES# Enable character mode download
  5. Idle_session_timeout=300# Disconnect after idle time exceeds 300 seconds
  6. Data_connection_timeout=300# The data connection timeout is 300 seconds.
  7. Xferlog_enable=YES# Enable log upload/download
  8. Xferlog_file=/Var/log/vsftpd. log # log file storage location
  9. Dirmessage_enable=YES# Enable directory. message Information
  1. Access Mode for Linux SVN installation and startup
  2. Install services in Linux Samba and modify firewall configurations to allow access
  3. The most basic commands in the Linux mount command
  4. Configure Linux YUM source settings to use a proxy
  5. Add Linux smb service to firewall and start automatically

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.