Centos configuration and installation of vsftp server

Source: Internet
Author: User
Tags centos

Install vsftp server


Run the rpm-q vsftpd command to check whether this service is installed. If yes, the vsftp version is displayed. If no version is installed, the system prompts "package vsftpd is not installed ". Run the "yum-y install vsftpd" command to install the SDK. The installation process is as follows:

Go to the/etc/vsftpd directory and you can see the main vsftpd configuration file:

/Etc/vsftpd. conf // master configuration file

/Etc/vsftpd/ftpusers // user files prohibited from logging on to FTP

/Etc/vsftpd/user_list // user files that allow FTP logon

 

Modify vi/etc/vsftpd. conf: change anonymous_enable = YES to NO to disable anonymous ftp logon and cancel the annotation symbol chroot_local_user = YES. Restrict ftp users to the home directory. Create a www directory under the home directory as the main directory for ftp logon.

 

Run "service vsftpd start" to start the vsftp service.

Run the "useradd-d/home/www-s/sbin/nologin testftp" command, which means to add a user testftp to the/home/www directory. Then, use passwd testftp to set the user password. Then, use chmod-R 755/home/www and chown-R testftp/home/www to set permissions.

 

Then, log in with the ftp account and password you just set.

Finally, add the command "chkconfig -- levels 3 vsftpd on" to start vsftp at startup"

Vsftpd logon error 500 OOPS: cocould not open chroot () list file:/etc/vsftpd/chroot_list solution


The first is:

Restrict users to access only the configured directory and other paths
Modify vi/etc/vsftpd. conf
Chroot_list_enable = YES // restrict access to its own directory and change YES to NO
# (Default follows)


The second is:

To restrict the access to the current directory, but because of this configuration, an error is returned if the empty file vsftpd/chroot_list is to be read. This is a restricted user list.

Create a user list without writing any content.

Run the "vi/etc/vsftpd/chroot_list" command to create a new file, enter some text, save and exit.

Related Article

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.