Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.

share|improve this answer
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 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.