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

On a Linux (ubuntu) machine, an automated script running as a normal user is creating a subdirectory under its home directory. For some reason, the directory is created with Access: (0000/d---------). umask is 0022. This obviously means the script can't create any files in that directory. Can anyone think of anything?

Apparently this only happens with the non-superuser account.

Update: The problem was actually a bug. mkdir was called as a system command from C code, not as the command-line utility. And the programmer who called it used mode=0...

Anyway - the reason it DID work when running as root, is that root can create files in directories even when the permissions don't allow it.

share|improve this question
wow, cool problem. Thanks for updating with the solution – Matt Simmons Jun 16 '09 at 13:11

What is the umask of that users login session set to?

Also you can always chmod the directory after you create it. "man chmod" for details.

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.