I have a bunch of machines that are not happy about running logrotate daily. I get these error emails:
Subject: Cron root@adama run-parts /etc/cron.daily /etc/cron.daily/logrotate: error: cannot open current directory: Permission denied
Does anyone know what would cause this?
- Mike
On Mon, 2008-11-10 at 08:07 -0500, Dr. Michael J. Chudobiak wrote:
I have a bunch of machines that are not happy about running logrotate daily. I get these error emails:
Subject: Cron root@adama run-parts /etc/cron.daily /etc/cron.daily/logrotate: error: cannot open current directory: Permission denied
Does anyone know what would cause this?
- Mike
Looks like a permission problem of cron.daily Should be:
-rwxr-xr-x 1 root root 943 2007-10-22 03:36 /usr/bin/run-parts -- ======================================================================= An editor is one who separates the wheat from the chaff and prints the chaff. -- Adlai Stevenson ======================================================================= Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam@sbcglobal.net
Subject: Cron root@adama run-parts /etc/cron.daily /etc/cron.daily/logrotate: error: cannot open current directory: Permission denied
Looks like a permission problem of cron.daily
No, that's not it. It's failing at this line of source code:
here = open(".", O_RDONLY);
Why wouldn't logrotate be able to open "."? It must be selinux - I am seeing stuff like
type=AVC msg=audit(1226307734.708:7252): avc: denied { read } for pid=32085 comm="logrotate" name="root" dev=dm-0 ino=13028929 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:admin_home_t:s0 tclass=dir
type=SYSCALL msg=audit(1226307734.708:7252): arch=40000003 syscall=5 success=no exit=-13 a0=80525d3 a1=8000 a2=0 a3=8000 items=0 ppid=32083 pid=32085 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1164 comm="logrotate" exe="/usr/sbin/logrotate" subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)
I'll try "touch /.autorelabel" and see what happens...
- Mike