Linux system VSFTPD Build FTP

Source: Internet
Author: User

Installing Vsftp
    • Installing vsftp with the Yum command
#vsftpd-y
add FTP account and directory
    • First check the location of the nologin, usually under/usr/sbin/nologin (*nologin role is to restrict some users to the Shell landing system)
    • Create an account using the following command, which specifies the home directory/home/lvstatic for the user lxftp:
#useradd-D/home/lvstatic-s/usr/sbin/nologin lxftp
    • Modify the account password:
#passwd lxftp
    • Modify permissions for the specified directory
#Chown -R lxftp/home/lvstatic
Configure Vsftp
    • Edit the Vsftp configuration file with the following command:
#VI /etc/vsftpd/vsftpd.conf
    • Change "Anonymous_enable=yes" in the configuration file to "Anonymous_enable=no"

Remove the comment symbol before the following configuration:

Local_enable=yes

Write_enable=yes

Chroot_local_user=yes

Save changes

Modify Shell Configuration
    • VI Edit/etc/shells, if there is no/usr/sbin/nologin in the file, append it.
Start the VSFTP service and test the login
    • To start the VSFTP service with a command:
#service vsftpd Start

Then use the Account LXFTP test whether you can login ftp, directory is/home/lvstatic.

If the client connection times is wrong: "OOPS:vsftpd:refusing to run with writable root inside Chroot ()"

  

    • Workaround:

Modify the VSFTPD configuration file on the server vsftpd.conf

Vim/etc/vsftpd/vsftpd.conf

Add a line configuration Allow_writeable_chroot=yes and then save the exit, restart the VSFTP service (services vsftpd restart)

  

Note: With respect to permissions, FTP users must have read and write access to each layer of his or her directory recursively.

chmod 777 Directory name or chmod–r 777 directory name

Turn on log function
    • Open configuration file
  VI /etc/vsftpd.conf
    • Turn on log parameters

#xferlog_enable =yes #表示启用日志功能

    • Configuring the Log Path

#xferlog_file =/var/log/vsftpd.log #设置日志存放位置 for:/var/log/vsftpd.log

    • Restart FTP effective configuration

Service VSFTPD Restart

Linux system VSFTPD Build FTP

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.