I'm running a program (syslog-ng) that must read and write several files in a given path. It was failing at start, claiming that it is unable to open a file in that path.Please, assume this directory structure:/var/platform/programThe platform directory has the permission set to 0655 (not execute permission to the owner user). If I change that permissions to 0755, syslog-ng works fine.On the other hand, I have written a small program in C that try to open and write into a file in the same directory, and it works without problem when running as root, but syslog-ng is failing...What can be the problem in this case?
Process owned by root can't write files
permissions;directory
syslog wants probably to chdir to the directory and needs therefore the execute bit set on the directory.See Execute vs Read bit. How do directory permissions in Linux work? for more information.