Add an FTP user to Linux and set the appropriate permissions

Source: Internet
Author: User

To add an FTP user to Linux and set the appropriate permissions, proceed as follows:

1, Environment: FTP for VSFTP. The user named Test is restricted. The restricted path is/home/test

2, build the user: Under the root User:

useradd-d/home/test Test//Add user test and make test user's home directory as/home/test
passwd test//Set a password for test

3, change the user's corresponding permission settings:

Usermod-s/sbin/nologin test//Limit user test cannot telnet, FTP only
Usermod-s/sbin/bash Test//user test returned to normal
usermod-d/test Test//change user test's home directory to/test

4, restrict the user to access only/home/test, cannot access other paths

Modify the/etc/vsftpd/vsftpd.conf as follows:

Chroot_list_enable=yes//Restrict access to own directory
# (default follows)
Chroot_list_file=/etc/vsftpd/vsftpd.chroot_list

Edit the Vsftpd.chroot_list file to add restricted users, one row per user name

Do not forget to restart the VSFTPD server after changing the configuration file
[Email protected] root]#/etc/init.d/vsftpd restart

Add an FTP user to Linux and set the appropriate permissions

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.