Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Ok, i have a user "nas" on my ubuntu server. In his home directory i have a "shared" folder but I also want to let a user create their own folder at this level for personal use. so any user that logs in can create a folder that they will have exclusive (unreadable by anyone else) access to, and if they want to share something they put it in the shared folder. How would I achieve this? I was reading about the permissions on the /tmp directory using setuid and think that may be a clue to it...

share|improve this question

Option 1: Make the top-level directory world-writable.
Remind users that permissions on the directories they create are THEIR responsibility as the owner of the directory.
Note that this lets users create more than one directory. Your users will eventually screw it up and make a mess (axiom: Users Are Dumb.)
As you have correctly surmised, the sticky bit (+t, as found on /tmp) is important here: It keeps users from removing other people's directories, which they would be able to do if the top-level directory was world-writable without the sticky bit.

Option 2: Make the top-level directory owned by root. Create a subdirectory for each user when you create their account.
You can set the permissions on the users' directories to whatever you want as a default (0700 is a good start). Again, managing permissions on it after that is THEIR responsibility as the owner of the directory.
This keeps your users from making a mess of the top-level directory. You can automate the directory creation bits as part of your user creation script (you DO use a script, right? :)

share|improve this answer
Awesome thank you. I also forgot to mention that this NAS is on a network with about an 80-20 ratio of windows users to linux users. Samba permissions come into play also – pmilb Dec 9 '11 at 13:40
Samba permissions are a different (and substantially more complex) breed of beast. – voretaq7 Dec 9 '11 at 18:28

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.