On Fri, Sep 28, 2001 at 12:04:19AM +0100, Carlos Sousa wrote: > On my machine root keeps getting email from cron saying "rm: cannot > unlink `/var/cache/man/cat8/(whatever).gz': Permission denied". > > I've traced this behaviour to the man-db cron job trying to remove > stale files from the /var/cache/man tree while running as user 'man', > because running the command mannualy with '--chuid man' generates the > error messages, while using '--chuid root' makes it succeed. > > The strange thing about this is that the cached man files are owned by > 'man', so why should the rm command fail when run as user 'man'?
It shouldn't. Could you show me the permissions on /var/cache/man/cat8 (using 'ls -ld')? > Further inspection shows that the /var/cache/man directories are SGID > root, and the cached files are owned by user 'man' and group 'root' > (instead of group 'users'). Unfortunately I don't know what a "SGID > directory" means, so I can't relate it to my problem. The setgid directory should be irrelevant (it causes files created in that directory to be owned by that group - I've been wondering whether the sgid bit is necessary there for a while now, but haven't had the nerve to change it this close to the freeze in case something weird breaks). > I could solve this matter by either: > > 1) changing the man-db cron file so that the command is run as root > (inelegant), > 2) removing the SGID bit from the /var/cache/man directory and > subdirectories (seems dangerous) > > Could you advise on a better solution? You might like to file a bug report against the man-db package, where we can sort this out in more detail. Also, what version of man-db are you using? Thanks, -- Colin Watson [EMAIL PROTECTED]