LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Log file permissions (https://www.linuxquestions.org/questions/linux-general-1/log-file-permissions-267048/)

mikeyt_333 12-16-2004 09:57 AM

Log file permissions
 
I'm installing postgres, and I've set it up to run as user nobody. I chose this because most of my other services run as nobody. How can I grant proper access to the log files to allow writing to the log files by user nobody, but not modification of the log files. I looked at the /var/log structure, and everything is owned by root exclusively, yet everything still logs just fine. I get a permission denied error when I try to start postgres using /var/log as a logging location.

Thanks!
Mike.

rjlee 12-16-2004 10:45 AM

Re: Log file permissions
 
Quote:

Originally posted by mikeyt_333
I looked at the /var/log structure, and everything is owned by root exclusively, yet everything still logs just fine.
This is because it's root that's doing the logging, probably via the syslog daemon.

The most secure way of doing logging is to set up postgres to log to a syslog facility, then set up syslog to log to an appropriate file.

mikeyt_333 12-16-2004 11:15 AM

dur, I should have thought of that. Thanks!

Mike.


All times are GMT -5. The time now is 08:32 PM.