How to create ftp user with access to subfolder in the another user's home directory?

  • Posted on December 29, 2014
  • sabandAsked by saband

Hello. I have some user, for example, “example” :) And his home directory is /var/www/example/, where are sites folders (/var/www/example/ For ftp access I use this user’s login “example” and his password. But. I need to create another one ftp user, with access to the folder /var/www/example/ and only to this folder. I can’t create a unix user with such home directory. Is there a way to resolve this problem?

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.

Actually, you can create a user with /var/www/example/ as its home directory:

adduser --home /var/www/example/ --group username

Indeed. I just tried to use already existing directory as home, that’s why it didn’t work. Thank you.