Bug 583489

Summary: Log rotation permissions wrong
Product: [Fedora] Fedora Reporter: Trever Adams <trever>
Component: squidAssignee: Jiri Skala <jskala>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: aglotov, dnovotny, henrik, jonathansteffan, jskala, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: squid-3.1.1-4.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-04 23:53:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Trever Adams 2010-04-18 19:55:44 UTC
Description of problem:
On April 2nd there were releases to squid and logrotate. One of these, or both, was broken. Now, every Sunday on logrotate permissions for the logs gets set to root.adm instead of squid.squid which causes squid to shut down and/or crash.

Version-Release number of selected component (if applicable):
logrotate-3.7.8-7.fc13.i686
7:squid-3.1.1-2.fc13.i686

How reproducible:
Every Sunday

Steps to Reproduce:
1. Install Squid
2. Use Squid
3. Sunday
4. Squid is gone

Comment 1 Henrik Nordström 2010-04-18 21:41:24 UTC
Strange. The logrotate definition for squid have not changed in ages.

What is the create directive set to in your /etc/logrotate.conf? The squid logrotate scripts assumes the default is just "create" with no user or mode specified (means mode & owner will be inherited from old log) and will break if the system default setting is changed to force root owner. 

A simple fix is adding the 

   nocreate

directive to /etc/logrotate.d/squid as Squid will automatically create the logfiles when reopening them.

Comment 2 Henrik Nordström 2010-04-18 21:46:41 UTC
Note: The default "create" is intentional for Squid to keep any permission or group changes made to the log files. Using nocreate will make the permissions reset to Squid default on each rotate.

Comment 3 Ondrej Vasik 2010-04-18 22:40:43 UTC
Probably caused by change for https://bugzilla.redhat.com/show_bug.cgi?id=489038 , added logrotate maintainer to cc.

Comment 4 Trever Adams 2010-04-19 07:22:51 UTC
create 0640 root adm

Yes, it does appear to have been caused by changes from that bugreport. I am not sure what the correct solution is, but as is things do NOT work.

As you mentioned in that bug report, you are fine with adding nocreate to /etc/logrotate.d/squid. Unless a good reason shows up for not doing this, can you do so?

Comment 5 Trever Adams 2010-04-19 07:23:12 UTC
create 0640 root adm

Yes, it does appear to have been caused by changes from that bugreport. I am not sure what the correct solution is, but as is things do NOT work.

As you mentioned in that bug report, you are fine with adding nocreate to /etc/logrotate.d/squid. Unless a good reason shows up for not doing this, can you do so?

Thank you very much.

Comment 6 Fedora Update System 2010-04-19 20:06:45 UTC
squid-3.1.1-4.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/squid-3.1.1-4.fc13

Comment 7 Fedora Update System 2010-04-21 02:24:57 UTC
squid-3.1.1-4.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update squid'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/squid-3.1.1-4.fc13

Comment 8 Trever Adams 2010-04-27 13:30:43 UTC
I believe this has been fixed. Please, leave it open until next Monday, just in case.

Comment 9 Trever Adams 2010-05-03 18:42:21 UTC
It is indeed fixed. Squid is still running, no restarts, no reboot. Thank you very much. You can close this as soon as QA is finished (since I am not sure what is involved there).

Comment 10 Fedora Update System 2010-05-04 23:53:35 UTC
squid-3.1.1-4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.