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

"/etc/cron.daily/man-db: /var/cache/man: Permission denied"



(Please first cc to me, if i got a reply i will switch to reading the archive)

Hello, 

This is Debian Sid, and since a few months i got this error 
message (sent via local mail):

/etc/cron.daily/man-db:
find: /var/cache/man: Permission denied

and i just can't come up with any explanation.
Perhaps somone can give me a hint ?

This is what i can find so far:

/var is mounted as:
/dev/hda10 on /var type ext2 (rw,nosuid,nodev,errors=remount-ro)

The permissions are:
drwxr-xr-t 17 root root 4.0K 2006-04-02 03:00 /var
drwxrwxr-x 26 root root 4.0K 2006-08-12 20:49 /var/cache/
drwxr-sr-x 16 man  root 4.0K 2006-08-18 00:06 /var/cache/man

The last one contains:
drwxr-sr-x 2 man root 4.0K 2004-05-25 02:03 cat1
drwxr-sr-x 2 man root 4.0K 2004-05-15 16:49 cat2
drwxr-sr-x 2 man root 4.0K 2004-05-15 16:49 cat3
drwxr-sr-x 2 man root 4.0K 2004-02-02 10:48 cat4
drwxr-sr-x 2 man root 4.0K 2004-05-24 02:25 cat5
drwxr-sr-x 2 man root 4.0K 2003-07-23 02:36 cat6
drwxr-sr-x 2 man root 4.0K 2004-03-11 07:47 cat7
drwxr-sr-x 2 man root 4.0K 2004-05-25 02:03 cat8
drwxr-sr-x 2 man root 4.0K 2004-05-17 04:07 cat9
drwxr-sr-x 3 man root 4.0K 2006-08-18 00:06 fsstnd
-rw-r--r-- 1 man root 2.0M 2006-08-16 00:15 index.db
drwxr-sr-x 3 man root 4.0K 2006-08-18 00:06 local
drwxr-sr-x 3 man root 4.0K 2006-08-18 00:06 oldlocal
drwxr-sr-x 2 man root 4.0K 2002-03-18 13:08 opt
drwxr-sr-x 7 man root 4.0K 2006-05-07 15:58 X11R6

None of the subdirectories of /var/cache/man contains any file,
(besides some index.db ). Apparently, manpages are stored in 
/usr/hsare/man, instead, but that has

drwxr-xr-x   34 root root  4.0K 2006-05-28 13:00 man/

on all levels.  - Which seems a little bit weird to me; but 
/var/cache/man seems to have been installed by package 
man-db, too.

I can see man-db 2.4.3-3  and manpages 2.34-1 are installed.
Well, maybe that's not actually Sid but 'testing' since i downgraded the 
sources list to 'testing' some week ago, but it will last some more weeks 
until a full turnover, and the error message was sent afterwards and all the 
time anyway.

The cron.daily script will re-create a missing /var/cache/man with exactly 
the existing permissions:

if ! [ -d /var/cache/man ]; then
    # Recover from deletion, per FHS.
    mkdir -p /var/cache/man
    chown man:root /var/cache/man
    chmod 2755 /var/cache/man

and /etc/crontab has all cron scripts running as root.

Maybe this here is the bit of the script which leads to the error ?

  start-stop-daemon --start --pidfile /dev/null --startas /bin/sh \
	--oknodo --chuid man -- -c \
	"find /var/cache/man -type f -name '*.gz' -atime +6 -print0 | \
	 xargs -r0 rm -f"


I have 
lrwxrwxrwx 1 root root 4 2006-07-24 18:21 /bin/sh -> bash*


The 'man' command is aliased for 'root' by a function here (invoking pinfo)
but i assume system calls it always by full path:

lrwxrwxrwx 1 root root 17 2006-08-12 20:50 /usr/bin/man -> ../lib/man-db/man
-rwxr-xr-x 1 root root 85K 2005-09-21 14:23 /usr/lib/man-db/man


So...what ?



   °
 /\/



Reply to: