LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to are logs written to? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-are-logs-written-to-114675/)

robadawb 11-11-2003 01:26 AM

how to are logs written to?
 
Can someone explain to me or provide some documentation on how logs files are written to (mail logs, httpd logs, etc). I'm a little confused. If you try to change the permissions on a log file the default permissions will eventually comeback. Is the file being recreated or are the permissions being set manually? Is this a cron job or a process attached to log rotation? Thanks in advance.

yapp 11-11-2003 03:56 AM

The log files are created by the syslogger. (syslogd) this program receives events, and sorts them into log files with help of /etc/syslog.conf After changing the syslog.conf, you need to reload the syslogger again. (...and not rebooting your entire machine for this :p)

Because log files can get very huge, a program called "logrotate" will be run periodically. It moves the files files to name.1, name.2, etc.. and eventually archives or deletes the logs. and yes, this program is ran from a cron job now and them. (which is a good thing)


but I have a question too; why do you want to change the permissions of the log files? they didn't kept them locked for normal users because it was a funny thing to do ;)


All times are GMT -5. The time now is 12:14 PM.