Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How can I add a new vsftpd user on CentOS 5 ? I would like that user to default to a certain directory other than its own. Note that chroot is on. Should I do something like this?

useradd vsftpuser1 -d /home/mainaccount
passwd vsftpuser1

Do I have to edit anything in vsftpd or is this it?

Also, in /etc/vsftpd.ftpusers it has root in with a group of users that are not allowed to login via ftp . If I remove root from this, will root be able to *s*ftp in without chroot restrictions? Is there any threat to my system by let root in in this manner?

share|improve this question

2 Answers 2

Follow the manual for adding new users. That's why they are written.

You won't allow root to access the FTP server! This is the highest security risk you can expose your host to. FTP transmits the password in clear text over the wire. Everybody having access to the network can easily sniff the password. Having the password you give everybody full control over your server! In other words: Don't do that!!

SFTP is another protocol and has nothing to do with FTP beside the name. A protocol related to FTP is FTPS which is nothing else than FTP over SSL. SFTP is something like FTP alternative over SSH.

share|improve this answer

The method you have outlined will work for creating ftp users. You may need to change the Selinux policy to Allow ftp to read/write in the user home directories

sudo /usr/sbin/setsebool -P ftp_home_dir 1

Regarding letting root log in over ftp or ftps - DON'T just don't. The fewer places root can access your system from the safer it is.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.