How to create a limited ftp account?

Hello So, now I have this problem… I’m able to create a new user and change it’s home folder to where I want:

adduser --no-create-home username
chown username:username /var/www/html/
usermod --home /var/www/html/ username

But now how can I limit this user to see/write only in its home directory (/var/www/html/) and not go above this directory via ftp? Right now the user is able to see everything. Anyone has any ideia? I was not able to find an answear for this using openssh-sftp. I’m using ubuntu 14.04, btw.

Thank you!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Is there any security issue with containing Group users except myself (mr-admin) in sshd_config this way:

… Match Group users ChrootDirectory %h AllowTCPForwarding no X11Forwarding no ForceCommand internal-sftp

Match User mr-admin ChrootDirectory / AllowTCPForwarding no X11Forwarding no ForceCommand internal-sftp

Hey, I read here:

and under step two, you’ll find:

sudo nano /etc/vsftpd.conf

By uncommenting command to chroot_local_user. When this line is set to Yes, all the local users will be jailed within their chroot and will be denied access to any other part of the server.


that way, you make boundaries.

where you using the correct port 22 in filezila for the new user?