logrotate. Bug or am I blind?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello!
I having a problem with the permissions of some of my logfiles.
It seems that when the files are rotated, the user/group is root root and the permissions are rw for root only.
more info hereunder:
The strange thing is that sometimes it works for one file...


/var/log/cisco_acl.log /var/log/cisco_debug.log {
    rotate 1
    notifempty
    #daily
    size 1k
    create 0640 root noc
    postrotate
        /bin/kill -HUP `cat /var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
    endscript
}

[root@syslog-b11 log]# ls -l cisco*
-rw-r-----  1 root noc  2816 Dec 19 11:06 cisco_acl.log
-rw-r-----  1 root noc 40304 Dec 19 11:07 cisco_debug.log

[root@syslog-b11 log]# logrotate -v /etc/logrotate.conf
rotating pattern: /var/log/cisco_acl.log /var/log/cisco_debug.log  1024 bytes (1 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/cisco_acl.log
  log needs rotating
considering log /var/log/cisco_debug.log
  log needs rotating
rotating log /var/log/cisco_acl.log, log->rotateCount is 1
renaming /var/log/cisco_acl.log.1 to /var/log/cisco_acl.log.2 (rotatecount 1, logstart 1, i 1),
renaming /var/log/cisco_acl.log.0 to /var/log/cisco_acl.log.1 (rotatecount 1, logstart 1, i 0),
renaming /var/log/cisco_acl.log to /var/log/cisco_acl.log.1
creating new log mode = 0640 uid = 0 gid = 900
running postrotate script
running script with arg /var/log/cisco_acl.log: "
        /bin/kill -HUP `cat /var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
"
removing old log /var/log/cisco_acl.log.2
rotating log /var/log/cisco_debug.log, log->rotateCount is 1
renaming /var/log/cisco_debug.log.1 to /var/log/cisco_debug.log.2 (rotatecount 1, logstart 1, i 1),
renaming /var/log/cisco_debug.log.0 to /var/log/cisco_debug.log.1 (rotatecount 1, logstart 1, i 0),
renaming /var/log/cisco_debug.log to /var/log/cisco_debug.log.1
creating new log mode = 0640 uid = 0 gid = 900
running postrotate script
running script with arg /var/log/cisco_debug.log: "
        /bin/kill -HUP `cat /var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
"
removing old log /var/log/cisco_debug.log.2

[root@syslog-b11 log]# ls -l cisco*
-rw-r-----  1 root     noc          4305 Dec 19 11:10 cisco_acl.log
-rw-r-----  1 root     noc         66976 Dec 19 11:11 cisco_debug.log

[root@syslog-b11 log]# logrotate -v /etc/logrotate.conf

considering log /var/log/cisco_acl.log
  log needs rotating
considering log /var/log/cisco_debug.log
  log needs rotating
rotating log /var/log/cisco_acl.log, log->rotateCount is 1
renaming /var/log/cisco_acl.log.1 to /var/log/cisco_acl.log.2 (rotatecount 1, logstart 1, i 1),
old log /var/log/cisco_acl.log.1 does not exist
renaming /var/log/cisco_acl.log.0 to /var/log/cisco_acl.log.1 (rotatecount 1, logstart 1, i 0),
old log /var/log/cisco_acl.log.0 does not exist
log /var/log/cisco_acl.log.2 doesn't exist -- won't try to dispose of it
renaming /var/log/cisco_acl.log to /var/log/cisco_acl.log.1
creating new log mode = 0640 uid = 0 gid = 900
running postrotate script
rotating log /var/log/cisco_debug.log, log->rotateCount is 1
renaming /var/log/cisco_debug.log.1 to /var/log/cisco_debug.log.2 (rotatecount 1, logstart 1, i 1),
old log /var/log/cisco_debug.log.1 does not exist
renaming /var/log/cisco_debug.log.0 to /var/log/cisco_debug.log.1 (rotatecount 1, logstart 1, i 0),
old log /var/log/cisco_debug.log.0 does not exist
log /var/log/cisco_debug.log.2 doesn't exist -- won't try to dispose of it
renaming /var/log/cisco_debug.log to /var/log/cisco_debug.log.1
creating new log mode = 0640 uid = 0 gid = 900
running postrotate script

[root@syslog-b11 log]# ls -l cisco*
-rw-------  1 root root   1066 Dec 19 11:23 cisco_acl.log
-rw-r-----  1 root noc   10088 Dec 19 11:22 cisco_acl.log.1
-rw-------  1 root root   6164 Dec 19 11:23 cisco_debug.log
-rw-r-----  1 root noc  137116 Dec 19 11:22 cisco_debug.log.1


-- 

Cheers!

Wim De Hul
-----------------------------------------
 Belgacom International Carrier Services
 AS6774
-----------------------------------------
 Tel:     +32 2 547 5151 option 1-3
 Mail:    noc@xxxxxxxxxx
 Peering: peering@xxxxxxxxxx
 Abuse:   abuse@xxxxxxxxxx
-----------------------------------------
 My public key is available at:
  hkp://subkeys.pgp.net
-----------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.centos.org/pipermail/centos/attachments/20051219/e039a9e1/attachment.bin

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux