1

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!

Thibaut Barrère
  • 691
  • 1
  • 9
  • 17

1 Answers1

4

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
Dennis Williamson
  • 62,149
  • 16
  • 116
  • 151