Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.