How to add/remove FTP users and set permissions in Linux?

  
 

Add ftp user in linux, and set the corresponding permissions, the operation steps are as follows: 5, if you need to allow users to change the password, but there is no telnet login system permissions: usermod -s /usr/bin/passwd test //After the user telnet, it will directly enter the modified interface

1, environment: ftp is vsftp. The user name is set to test. The restricted path is /alidata/www/test

2. User: Under the root user:

useradd -d /alidata/www/test test //Add user test and make The test user's home directory is /alidata/www/testpasswd test //set the password for test

3, change the user's corresponding permission settings:

usermod -s /sbin/nologin test //Qualified user test can not telnet, only ftpusermod -s /sbin/bash test //User test restores normal usermod -d /test test //Change the home directory of user test to /test4, restrict users to only access /home/test, Cannot access other paths to modify /etc/vsftpd/vsftpd.conf as follows:

chroot_list_enable=YES //Restrict access to its own directory# (default follows)chroot_list_file=/etc/vsftpd/vsftpd.chroot_list

Edit the vsftpd.chroot_list file to add restricted users. Change the configuration file for each user name. Don't forget to restart the vsFTPd server [root@localhost]# /etc/init.d/vsftpd restart

6, if you want to delete the user, use the following code:

userdel test userdel + users can delete ftp



Copyright © Windows knowledge All Rights Reserved