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


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


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.

| 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 L Aug 22 '10 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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