CentOS / RHCE vsftpd Configuration

ftp service is the most common and most frequently used, is the most asked questions. Many ftp species, such as vsftp, pureftp, proftp and so on. Webmaster often use ftp, often can not handle ftp. Here beginners configuration vsftp. 1. Install
# yum -y install vsftpd
2. Start Services
# service vsftpd start
3. Since the start
# chkconfig vsftpd on
4. Add ftp account
# useradd –d /data/wwwroot/www.ttlsa.com/webroot -g nobody –s /sbin/nologin ttlsa_ftp
[warning] if the latter do not add -s / sbin / nologin parameters established by the user as an ordinary system users have permission to login to the server, which is very dangerous. [/ warning] Notes: -s / sbin / nologin is not allowed to login. -d is the designated user directory for /data/wwwroot/www.ttlsa.com/webroot, into any directory you want according to your needs. -g nobody nobody the user to the group. (I have nobody here is to add to the group, in order to run web) ttlsa_ftp is ftp username, ftp into your user name. After executing the command, if the following message appears: useradd: warning: the home directory already exists Not copying any file from skel directory into it which shows the user's directory already exists, not add the user fails, you can ignore... 5. Create a password
# passwd ttlsa_ftp
6. Modify directory properties
# chown -R ttlsa_ftp /data/wwwroot/www.ttlsa.com/webroot
Recursive the owner of all directories and files changed ttlsa_ftp this way, the site can not only run, ftp can also be modified. 7. Configure ftp
# vi /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
chroot_local_user=YES
Basic can keep the default parameters unchanged, the top two places need to be modified. 8. Restart the server to make it work
# service vsftpd restart
9. In the case of open selinux during upload or create a new folder action, if 550 or 553 error, which is caused due vsftp SELinux can not read and write files. You need to do the following settings:
# setsebool -P ftpd_disable_trans on
# setsebool -P ftp_home_dir on
Or turn off selinux
# setenforce 0
# vi /etc/selinux/config
SELINUX=disabled
Reproduced please specify from time to live operation and maintenance : http://www.ttlsa.com/html/3872.html

Reproduced in: https: //my.oschina.net/766/blog/211262

Guess you like

Origin blog.csdn.net/weixin_33711641/article/details/91545991