If a program requires write permission how should I set it with chown? Specifically, what would program foo's permissions be to solve this error?
failed to create pid file '/var/run/bar.pid': Permission denied
|
If a program requires write permission how should I set it with chown? Specifically, what would program foo's permissions be to solve this error?
|
||||
|
|
|
If you have a program In this case, So you would have to run the program as |
|||||
|
|
General approach: determine the user and group of the process trying to access the file. This is often found in the configuration of the software (such as webservers/mailservers/...), but if the software is already running use this:
Look for the process you want to configure access rights for. The first column tells you under which username it's running.
This will tell you to which groups the user belongs. Change the owner or group of the file to match the service. Note 1: As the question points out that the file is in /var/run/ I'm assuming only one process needs access, if this is not true, you shouldn't change owner or group, but you might consider adding the process' user to the group or creating a new group for this file/folder. Note 2: Funny things can happen with apparmor, which is a security system: it can prevent processes from writing to files and folders to which they have (on filesystem level) all necessary rights. With |
|||
|
|