0

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

1 Answer 1

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.

1
  • 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, 2010 at 12:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .