Bug 903752 - Create directive doesn't behave properly
Summary: Create directive doesn't behave properly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: logrotate
Version: 17
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-24 18:24 UTC by Maxime Carron
Modified: 2013-02-24 08:57 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-02-05 02:57:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Maxime Carron 2013-01-24 18:24:27 UTC
Description of problem:
=======================
Create directive doesn't behave properly.
If specified create directive create a new file with the mode, owner and group of the file just rotated and not the ones specified in the conf file.

Version-Release number of selected component (if applicable):
=============================================================
Tested on 
- fedora 17, logrotate-3.8.1-3
- RHEL 5, logrotate-3.7.4-9

How reproducible:
=================
always

Steps to Reproduce:
===================
1. touch /var/log/toto
2. chmod 644 /var/log/toto
3. ll /var/log/toto (-rw-r--r--. 1 root root 24 janv. 18:36 /var/log/toto)
4. edit /etc/logrotate.d/toto with config :
  /var/log/toto {
        create 0666 root root
        daily
        compress
        dateext
        rotate 10
  }
  => here we set permission 0666, which is different from the current on on /var/log/toto
5. force rotate :
   logrotate -f -v /etc/logrotate.d/toto
   => we notice in the log displayed on screen : "creating new /var/log/toto mode = 0666 uid = 0 gid = 0"
6. ll /var/log/toto
   => /var/log/toto still has 644 permissions

  
Actual results:
===============
logrotate doesnot apply the good permission

Expected results:
=================
logrotate should apply permission 666 to new file

Comment 1 Fedora Update System 2013-01-25 06:13:25 UTC
logrotate-3.8.3-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/logrotate-3.8.3-1.fc18

Comment 2 Fedora Update System 2013-01-25 06:26:33 UTC
logrotate-3.8.3-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/logrotate-3.8.3-1.fc17

Comment 3 Jan Kaluža 2013-01-25 06:30:25 UTC
It would be great if you could also verify if the bug is fixed. There is unit-test now for this bug and it is passing with logrotate-3.8.3. It also worked for me during tests.

Comment 4 Maxime Carron 2013-01-25 09:20:21 UTC
logrotate-3.8.3 fix the problem. Thank you.

I have the same problem with logrotate-3.7.4-9 on RHEL5.
Should I report the same bug against this version on RHEL bz?

Comment 5 Fedora Update System 2013-01-26 15:57:31 UTC
Package logrotate-3.8.3-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing logrotate-3.8.3-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1527/logrotate-3.8.3-1.fc18
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-02-05 02:57:22 UTC
logrotate-3.8.3-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2013-02-24 08:57:55 UTC
logrotate-3.8.3-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.