On Thursday 19 December 2002 18:19, shlomo solomon wrote: > I have a strange problem. Actually, I've solved it, but I don't like the > solution and I don't like not knowing what's causing it. So maybe someone > can help. > > I have a script to keep my ADSL connection up. When the script discovers a > problem, it writes a line to a log called /var/log/mylogs/adsl-down.log. > Since I wanted this log to be accessable by all users, I set permission to > 644. The owner and group are both root. Only a cron job run every 2 minutes > writes to the log (if it finds a problem). > > The problem is that every so often (I don't know when it happens), the > permission becomes 600 and non-root users can no longer read the file. > There are also some gz files in the /var/log/mylogs directory (created by > logrotate). The same thing happens to their permissions too. > > My solution was simple - run a cron job to reset the permissions for all > files in the directory to 644. But, although that works, it seems strange > that **something** is changing the permissions back to 600. >
My guess would be that you shouldn't be logging into a separate logfile at all. See logger(1). Either way I bet the culprit here is indeed logrotate. > Any ideas? - TIA -- "I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself?" ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
