For the ftp installation part, the operation steps are as follows:
You can use the yum command to directly install ftp
# yum install vsftpd
ftp service enable and disable command:
enable: # service vsftpd start
disable: # service vsftpd stop
After the installation is successful, you can use the ftp software to connect locally , the default account is the account and password of the virtual machine.
Add the ftp user in linux and set the corresponding permissions. The operation steps are as follows:
1. Environment:
ftp is vsftp and the restricted user name is test. The restricted path is /home/test
2. Create a user: under the root user:
# useradd -d /home/test test //Add user test, and make the 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 //Limited user test cannot telnet, only ftp
# usermod -s /sbin/bash test //User test returns to normal
# usermod -d /test test //Change the home directory of user test to /test
4. Restrict users to access only /home/test and not other paths:
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 and add the restricted users, one line per user name After
changing the configuration file, don't forget Restart the vsFTPd server.
# /etc/init.d/vsftpd restart
5. If you need to allow the user to change the password, but do not have the right to log in to the system by telnet:
# usermod -s /usr/bin/passwd test //Users will directly enter the password change interface after telnet
Installation and configuration of Linux FTP
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326373317&siteId=291194637
Recommended
Ranking