Install vsftp 1 in centos: install vsftp and run chkconfig -- list to check whether the vsftpd service is installed. Run the yum command to directly install: yum-y install vsftpd and then create a log file for it: touch/var/log/vsftpd. log2: Start and Configure Automatic startup use chkconfig -- list to view the vsftpd service startup items. If you see the following results: vsftpd 0: off 1: off 2: off 3: off 4: off 5: off 6: off all services are off. Note that off indicates whether the service will be automatically started when the server is started, run the following command to configure its own startup: chkconfig -- level 2345 vsftpd on #2345 corresponds to the preceding 0-6 items to view and manage the ftp service: Start the ftp service: service vsftpd start view ftp service status Status: service vsftpd status restart ftp service: service vsftpd restart disable ftp service: service vsftpd stop3. configure vsftp service edit/etc/vsftpd. conf file to configure the vsftp service: # vi/etc/vsftpd. conf 3.1 Edit and modify the following items: anonymous_enable = NO # Set not to allow anonymous access to local_enable = YES # Set that the local user can access. Note: If a virtual host user is used, all virtual users cannot access the project if the project is set to NO. Chroot_list_enable = YES # the user cannot leave the main directory xferlog_file =/var/log/vsftpd. log # set the path for saving vsftpd service logs. Note: This file does not exist by default. You must manually touch ascii_upload_enable = YES # Allow uploading in ASCII mode ascii_download_enable = YES # Set to support the upload and download functions in ASCII mode. Pam_service_name = vsftpd # PAM Authentication file name. PAM will perform authentication based on/etc/pam. d/vsftpd. The following are important CentOS FTP service configuration items for Vsftpd virtual user support. By default, vsftpd. conf does not contain these configuration items. You must manually add the RHEL/CentOS FTP service configuration. Guest_enable = YES # enable the virtual user function. Guest_username = ftp # specifies the host user of the virtual user. -In RHEL/CentOS, the built-in ftp user user_config_dir =/etc/vsftpd/vuser_conf # sets the path for storing the RHEL/CentOS FTP service file of the virtual user's personal vsftp. CentOS FTP service file (configuration file name = virtual user name) that stores virtual user personality 3.2 Create a chroot list and add ftp users to it: touch/etc/vsftpd/chroot_list echo ftp>/etc/vsftpd/chroot_list 3.3 for authentication: first, install the Berkeley DB tool, many people cannot find db_load. The problem is that this package is not installed. Yum install db4 db4-utils then, create the User Password text/etc/vsftpd/vuser_passwd.txt, note that the odd line is the user name, even the password test1pwd1 followed ,. generate the database file db_load-T-t hash-f/etc/vsftpd/vuser_passwd.txt/etc/vsftpd/vuser_passwd.db for virtual user authentication, and then edit the authentication file/etc/pam. d/vsftpd, comment out all the original statements and add the following two statements auth required pam_userdb.so db =/etc/vsftpd/vuser_passwd account required pam_userdb.so db =/etc/vsftpd/vuser_passwd, create a virtual user profile RHEL/CentOS FTP service file mkdir/etc/vsftpd/vus Er_conf/vi/etc/vsftpd/vuser_conf/test1 contains the following content: local_root =/opt/var/ftp # root directory of the virtual user (based on actual modification) write_enable = YES # writable anon_umask = 022 # mask anon_world_readable_only = NO anon_upload_enable = YES anon_mkdir_write_enable = YES anon_other_write_enable = YES 4. attach permissions to the directory and restart the vsftp service: mkdir/opt/var/ftpchmod 777/opt/var/ftp ********. If this parameter is not set, the error 530 may be reported. The root directory uploaded by the test1 user is the file service vsftpd restart5. FAQ: 5.1 553 cocould not cr The eate file is generally a SELinux problem. Set the value of SELinux and restart the server. Setsebool-P ftpd_disable_trans 1 service vsftpd restart may also be the red text above. The setting is incorrect. 5.2 500 OOPS: bad bool value in config file: write_enable Note: ensure that there is no space at the end of each line in your CentOS FTP service file. Generally, the error is caused by extra spaces. 5.3 after a virtual user uploads a file, the default permission is 600. the user cannot download the file and add or modify the value of anon_umask in the configuration file. For example, anon_umask = 022 or 000. In this way, you can use an ftp client to connect to windows. 1. when virtual_use_local_privs is set to virtual_use_local_privs = YES, the virtual user has the same permissions as the local user. When virtual_use_local_privs = NO, the virtual user and anonymous user have the same permissions. The default value is NO. When virtual_use_local_privs = YES and write_enable = YES, the virtual user has the write permission (upload, download, delete, and rename ). When virtual_use_local_privs = NO, write_enable = YES, anon_world_readable_only = YES, anon_upload_enable = YES, the virtual user cannot browse the directory, but can only upload files without other permissions. When virtual_use_local_privs = NO, write_enable = YES, anon_world_readable_only = NO, And anon_upload_enable = NO, the virtual user can only download files without other permissions. When virtual_use_local_privs = NO, write_enable = YES, anon_world_readable_only = NO, And anon_upload_enable = YES, virtual users can only upload and download files without other permissions. When virtual_use_local_privs = NO, write_enable = YES, anon_world_readable_only = NO, And anon_mkdir_write_enable = YES, the virtual user can only download files and create folders without other permissions. When virtual_use_local_privs = NO, write_enable = YES, anon_world_readable_only = NO, And anon_other_write_enable = YES, virtual users can only download, delete, and rename files without other permissions.