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

2007-03-03 Thread Micha

I think it's a problem with the way exim is configured. 
Exim is mailing the report locally. So that's why we couldn't find 
anything about cron-daily, man-db, or file permissions !
I can see the same error on two freshly installed Debian unstable 
boxes, with completely different archs and settings. 
I need to track it further, just wnated to drop a note to the archives.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=209185

keep it rolling

micha


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



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

2006-08-18 Thread Micha

| Thanks for your suggestion, i'll report if it worked.

No, sorry, even with /var mounted 'suid' i got still the same error mail...


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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



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

2006-08-17 Thread Micha
"David E. Fox" <[EMAIL PROTECTED]>:
| Hmm. nosuid on mounts may just not honor the set user id for
| executables. On the other hand, the manual page tells me that nosuid
| makes it ignore suid bits. (see man mount). So, semantically, those
| permissions are just rwxr-x-r-x, and even if yuur user is in the 'root'
| group, he cannot view the directory contents (because 'x' in a
| directory means permission to enter & view the contents).

I see, some years ago I configured /var in fstab like:

/dev/hda10  /var  ext2  owner,exec,errors=remount-ro

and though i knew i din't think too much about that 'owner' 
implies nosuid.


| First, try mounting /var without the nosuid part.

(How do i trigger a normal cron man-db run ?) 
... I'll see tomorrow.

| The way this ought to work (and I thought it did) was for example, 
| a hypothetical user looks at a frequently used man page 

I seem to remember in the past one got asked at installation time if 
manpages should be cached that way, or not, and i used to asnwer yes.
But AFAIKR there wasn't such a question at the last etch install i did
(few days agao). Maybe they ditched it altogether.

Thanks for your suggestion, i'll report if it worked.


micha

   °
 /\/



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

2006-08-17 Thread David E. Fox
On Fri, 18 Aug 2006 03:16:08 +0200
Micha <[EMAIL PROTECTED]> wrote:


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

Cron likely runs with no (or low level) permissions. 

> /var is mounted as:
> /dev/hda10 on /var type ext2 (rw,nosuid,nodev,errors=remount-ro)
> 
Hmm. nosuid on mounts may just not honor the set user id for
executables. On the other hand, the manual page tells me that nosuid
makes it ignore suid bits. (see man mount). So, semantically, those
permissions are just rwxr-x-r-x, and even if yuur user is in the 'root'
group, he cannot view the directory contents (because 'x' in a
directory means permission to enter & view the contents).

First, try mounting /var without the nosuid part.

> 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

OK, that's the same permissions that are set on my 'etch' box. And,
even though 'dfox' is not a member of the root or man groups, user dfox
(that's me) can run 'find man' in /var/cache/, which lists all
subdirectories underneath man, or find . inside man, which lists a
number of directories where local man pages are kept (that's what the
directory is for, by the way).

Even so, the permisions would seem correct (the third r-x is "other",
and since I am not a "man" :) or a "root", I am an "other", and this is
all good, because I can view files (-r) or go into the directorty (-x)
but an unable to write anything therein.


> 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.

All my man directories (under /var/cache/man) are set like:

drwxr-sr-x  2 man root  48 2005-11-12 05:24 cat1
drwxr-sr-x  2 man root  48 2005-11-12 05:24 cat2
drwxr-sr-x  2 man root  48 2005-11-12 05:24 cat3
drwxr-sr-x  2 man root  48 2005-11-12 05:24 cat4
drwxr-sr-x  2 man root  48 2006-05-07 06:30 cat5

I don't see that the system is working, for one - see the dates on
those directories? The way this ought to work (and I thought it did)
was for example, a hypothetical user looks at a frequently used man
page (like man ls). Since it takes more time to process the man page
than display it, a local copy is in /var/cache/man/ (in this case, cat1) for later perusal. Man would see that a processed
page was in the appropriate place, and display it. After a time, the
old entries in those cache directories would be deleted.

But, I have 0 bytes in all directories, and an overall usage of 1464K,
because of a large index.db. (That file was changed 2 days ago.)



-- 

David E. Fox  Thanks for letting me
[EMAIL PROTECTED]change magnetic patterns
[EMAIL PROTECTED]   on your hard disk.
---


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



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

2006-08-17 Thread Micha

(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 ?



   °
 /\/