Change all of the. php files under the store to the owner of FTPD
[Email protected] ~]# chgrp ftpd/store/*.php
[Email protected] ~]# chown ftpd/store/*.php
=========================== Add vsftp Account start===================================
View Linux Versions
[email protected]/]# cat Etc/issue
See if there are any installed vsftp on Linux
[Email protected]/]# find-name "VSFTPD"-print
[Email protected]/]# Rpm-qa|grep vsftp
111.47.0.249 root root
CMCC 123456 FTP Login
1. New user CMCC can only login FTP, not as a system user login, the default home directory for new users in/HOME/CMCC
[Email protected]/]# adduser-g ftp-s/sbin/nologin CMCC
[Email protected]/]# passwd CMCC
2. Specify home directory to user/var/tmp/cmcc1 cmcc1 123456
[Email protected]/]# adduser-d/var/tmp/cmcc1-g ftp-s/sbin/nologin cmcc1
[Email protected]/]# passwd CMCC1
//3. Limit FTP users to access their home directory only, not to return to the previous level directory into other directories
//chroot_local_user #是否将所有用户限制在主目录
[[email protected]/]# vim/etc/vsftpd/vsftpd.conf
Remove the comment symbol (' # ') for the following two lines of argument (' # ')//vim command/chroot find I edit ESC exit Edit: Wq save
chroot_list_ File=/etc/vsftpd/chroot_list//chroot_list_file=/etc/vsftpd/chroot_list #是否限制在主目录下的用户名单
4. Create the Chroot_list file under/ETC/VSFTPD:
[Email protected]/]# CD/ETC/VSFTPD
[email protected] vsftpd]# Touch chroot_list
[Email protected] vsftpd]# vim chroot_list
Then add the user name (one line) that needs to be restricted, such as:
Cmcc
Cmcc1
Save exit.
5. Restart Vsftp
[Email protected] vsftpd]# service vsftpd restart
6.userdel + users can delete FTP users
[Email protected]/]# Userdel CMCC1
7. If you need to allow the user to change the password, but do not have Telnet login system permissions:
Usermod-s/usr/bin/passwd CMCC//user Telnet will go directly to the change interface
Linux add vsftp account and set directory permissions