Add FTP users and Set permissions in Linux

Source: Internet
Author: User

Add an FTP user in Linux and set the permissions to add an ftp user in linux, and set the corresponding permissions as follows:
1. Environment: ftp is vsftp. The Restricted User Name is test. The restricted path is/home/test2. Create a user: Under the root user, add useradd-d/home/test/to add the user test, set/home/testpasswd test // as the main directory of the test user. 3. Change the user's permission settings:
Usermod-s/sbin/nologin test // user test cannot be telnet, only ftpusermod-s/sbin/bash test // user test can be restored to normal usermod-d/test // change the main directory of user test to/test
4. restrict user access to/home/test only. Do not access other paths. Modify/etc/vsftpd. conf: www.2cto.com chroot_list_enable = YES // restrict access to its own directory # (default follows) chroot_list_file =/etc/vsftpd. chroot_list edit vsftpd. add the Restricted Users to the chroot_list file. Change the configuration file for each user name line. Do not forget to restart the vsFTPd server [root @ linuxsir001 root] #/etc/init. d/vsftpd restart5. If you need to allow the user to change the password, but do not have the permission to log on to the system via telnet: usermod-s/usr/bin/passwd test // After user telnet, the password change interface is directly displayed.
Author aking21alinjuju

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.