sys-apps/man installs /usr/bin/man with setgid man, but the man group does not have permission to write to /var/cache/man/cat*. This caused problems for me when root somehow created an empty file in /var/cache/man/cat1: -r--rw-r-- 1 root man 0 Feb 3 18:00 nl.1.bz2 I don't know how this empty file got there, maybe this is another bug? Anyway man tries to do the right thing and actually correct this empty file, and it works okay if man is run as root. But if man is run non-root, it spews out this mess: $ man nl rm: remove write-protected regular empty file `/var/cache/man/cat1/nl.1.bz2'? y rm: cannot remove `/var/cache/man/cat1/nl.1.bz2': Permission denied Formatting page, please wait... sh: line 1: /var/cache/man/cat1/nl.1.bz2: Permission denied Error executing formatting or display command. System command (cd /usr/share/man && (echo ".pl 1100i"; /bin/gunzip -c '/usr/share/man/man1/nl.1.gz'; echo; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -Tlatin1 -c -mandoc | /bin/bzip2 > /var/cache/man/cat1/nl.1.bz2) exited with status 1. rm: remove write-protected regular empty file `/var/cache/man/cat1/nl.1.bz2'? y rm: cannot remove `/var/cache/man/cat1/nl.1.bz2': Permission denied bzip2: Compressed file ends unexpectedly; perhaps it is corrupted? *Possible* reason follows. bzip2: Success Input file = /var/cache/man/cat1/nl.1.bz2, output file = (stdout) It is possible that the compressed file(s) have become corrupted. You can use the -tvv option to test integrity of such files. You can use the `bzip2recover' program to attempt to recover data from undamaged sections of corrupted files. Reproducible: Always Steps to Reproduce: 1. As root: touch /var/cache/man/cat1/nl.1.bz2; chgrp man /var/cache/man/cat1/nl.1.bz2 2. As user: man nl Actual Results: See error above. Also note that new files are only added to /var/cache/man/cat* when running man as root. When running as a user, no cache files are written because man doesn't have permission. This doesn't make sense--I think the intention is that users should be able to write cache files since /usr/bin/man is setgid man? Expected Results: The following permission changes fix the problem: chgrp man /var/cache/man/cat* chmod g+w /var/cache/man/cat* Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.25_pre6-gss)================================================================= System uname: 2.4.25_pre6-gss i686 Intel(R) Xeon(TM) CPU 2.80GHz Gentoo Base System version 1.4.3.10 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -mcpu=pentium4 -O2 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/cvsroot /var/qmail/control /var/www" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium3 -mcpu=pentium4 -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://gentoo.noved.org http://adelie.polymtl.ca/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo/ ftp://www.ibiblio.org/pub/Linux/distributions/gentoo/" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl acpi apache2 arts avi berkdb bidi canna cjk crypt cscope cups curl doc emacs emacs-w3 encode esd evms2 fam fastcgi fbcon firebird foomaticdb freetds freewnn gdbm ggi gif gnome gpm gtk gtk2 guile imap imlib informix innodb java jpeg junit kde kerberos krb4 lcms ldap leim libg++ libwww mad maildir mbox mcal mikmod mmx motif mpeg mpi mule mysql ncurses nls oav oci8 odbc oggvorbis opengl oss pam pdflib perl plotutils png postgres ppds prelude python qt quicktime readline ruby samba sasl sdl slang slp snmp socks5 spell sqlite sse ssl svga tcltk tcpd tetex tiff truetype unicode usb wmf x86 xface xml2 xmms xv zeo zlib"
second this (me too!). installed versions here: sys-apps/man-1.5m app-arch/bzip2-1.0.2-r3 sys-apps/baselayout-1.8.6.12-r3 replying mainly to be cc'd; I'd be happy ho help tracing this;
*** Bug 40885 has been marked as a duplicate of this bug. ***
I can reproduce also: $ man emerge rm: remove write-protected regular empty file `/var/cache/man/cat1/emerge.1.bz2'? n Formatting page, please wait... sh: line 1: /var/cache/man/cat1/emerge.1.bz2: Permission denied Error executing formatting or display command. System command (cd /usr/share/man && (echo ".pl 1100i"; /bin/gunzip -c '/usr/share/man/man1/emerge.1.gz'; echo; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -Tlatin1 -c -mandoc | /bin/bzip2 > /var/cache/man/cat1/emerge.1.bz2) exited with status 1. rm: remove write-protected regular empty file `/var/cache/man/cat1/emerge.1.bz2'? $ Have just re-emerged sys-apps/man-1.5l-r6 & run the script "/etc/cron.daily/makewhatis.cron" but makes no difference.
seems this only happens with new installs of man ... fixed in cvs ... just `rm -rf /var/cache/man ; emerge man` if you're too lazy to fix the perms yourself :p
When it's fixed in CVS when will it show up in portage with a emerge sync? By new man install would that be one that happens when I upgrade portage? My system isn't new. Thanks.
weird, it didnt happen over here on any of my boxes ... cvs -> rsync happens every 30 minutes
Could always 'fix' it in pkg_postinst() ...
It's still broken. I attempted a man chmod as a user and got the error. Once I ran man chmod as root it worked. I did the rm man from /var/cache and things worked for awhile but it's back again. I think it either needs to be fixed or let the ebuild handle it. We shouldn't have to fix this every time man gets updated
it shouldnt be broken after you fix it once i havent seen it 'come back' on any of my boxes ...
I haven't really used man from a user account for a while but it is acting up again tonight. I did the rm ... emerge thing and it works now.
Spanky: it does seem to come back. I did an `emerge -U world` (for the first time in a month or 6 weeks) at the weekend & `man ls` failed today. As you'll see, I've posted to this bug before, and "fixed" this issue at that time.
seems the permissions get revereted so i'll do as azarah suggested
*** Bug 58536 has been marked as a duplicate of this bug. ***
*** Bug 58598 has been marked as a duplicate of this bug. ***
added to pkg_postinst() ... please try syncing up in a bit and re-emerging man and see if the errors go away
*** Bug 59400 has been marked as a duplicate of this bug. ***
I tried it as a user on several and so far it seems to work.
*** Bug 60710 has been marked as a duplicate of this bug. ***
*** Bug 61538 has been marked as a duplicate of this bug. ***
It seems to be incorrect in the stageX tarball... i guess. Would be great if it were fixed there, I cannot test that because I do not plan to install some gentoo on a clean machine anytime soon. After fixing ownership and directory modes in /var/cache/man it works and does not break again even after remerging man-1.5xyz
you dont really say which manpages but i doubt they'll get re-released it's not a major issue and should be resolved in our next round of releases
err, not which manpages, but which stage files