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.

I have a backup folder owned by a system user (mongodb) and chmoded 655. When I try to create files in it, it raises a permission issue:

root@maquina:/var/backups/mongodb# su -s /bin/bash mongodb -c "/usr/bin/touch test.txt"
/usr/bin/touch: cannot touch `test.txt': Permission denied

Chmoding to 755 enables me to create the file.

I guess I probably need to tweak the privileges (+X ?) but cannot find how.

Can anyone shed some light on this ?

Thank you!

share|improve this question
    
Why would do you want to have a permission of 655 on a folder you own? –  Zoredache Nov 23 '10 at 0:27

1 Answer 1

up vote 4 down vote accepted

You need to have execute permissions in the directory in order to do seeks there. Without being able to do a seek, you can't create a file

sudo chmod u+x /var/backups/mogodb
share|improve this answer

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.