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 have an ubuntu server and i give hosting to some users and i use the next command to create users and their ftp accounts: sudo adduser nameofthepage

This command creates a directory with the name of the page in the "/home" directory where users can put the files of their web pages.

But i have a serious problem, when users log in to the server with their ftp accounts they can go a directory up of the /home directory and see all the directories of the server, how can i limit it?

Thanks a lot.

share|improve this question

migrated from Apr 7 '11 at 21:59

This question came from our site for professional and enthusiast programmers.

what ftpd are you using ? – petrus Apr 7 '11 at 22:02
Normally what you want is achieved by a chrooted SFTP only setup or some restricted shell like rssh. Do you have to stay with a less secure FTP setup? – Karol Piczak Apr 7 '11 at 22:14

If /home is owned by root, which it probably is... you can always revoke read access for "others" on the /home directory itself.

sudo chmod o-r /home
share|improve this answer

If your concerned about that level of access, you might be better off using some kind of chroot or jail for users. There's pam_chroot and rssh that can be used to restrict users, and I'm sure some more jail options as well.

share|improve this answer

Hey, you should use virtual users for that. Look at mysql-pam.d you could have one database for ssh/ftp/other logins + disk quota or anything else just in one table. Check yours architection and scalability.

share|improve this answer

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.