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

I want to create a ftp user on my ubuntu server, and lock the user to a specific folder to read/write to.

I read I use the /usr/sbin/useradd but I don't see how I set the password?

thanks in advance

share|improve this question

1 Answer 1

This tutorial explains how you can lock a user in a chroot jail with vsftpd. The key option is:

chroot_local_user=YES

This means the user can not leave their home directory. There are multiple ways to create a user. By default, adduser will prompt you for a password and directory info.

However, you should consider sftp, with openssh-server, instead. There are ways to secure FTP, e.g. tunneling it over SSH or SSL. However, SFTP was originally designed with security in mind.

share|improve this answer
1  
Worth noting that OpenSSH only supports chrooting from v4.8p1 onwards. I'm not sure which version of OpenSSH Ubuntu ships with, but I know that CentOS 5.* comes with 4.7 so it may not be available. It's still possible to achieve, but judging by the question the OP will likely struggle. –  James Lawrie Aug 22 '10 at 12:49

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.