First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 40322
Alias:
Product:
Component:
Status: RESOLVED
Resolution: TEST-REQUEST
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Karl Fischer <karl@platy.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 40322 depends on: Show dependency tree
Bug 40322 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-02-03 15:32 0000
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"

------- Comment #1 From Peter Gantner (a.k.a. nephros) 2004-02-07 11:10:38 0000 -------
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;


------- Comment #2 From SpanKY 2004-02-08 14:27:01 0000 -------
*** Bug 40885 has been marked as a duplicate of this bug. ***

------- Comment #3 From Joe Stroller 2004-02-10 11:34:38 0000 -------
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.

------- Comment #4 From SpanKY 2004-02-10 17:08:31 0000 -------
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

------- Comment #5 From Brett I. Holcomb 2004-02-10 17:29:57 0000 -------
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.

------- Comment #6 From SpanKY 2004-02-10 17:33:51 0000 -------
weird, it didnt happen over here on any of my boxes ...

cvs -> rsync happens every 30 minutes

------- Comment #7 From Martin Schlemmer (RETIRED) 2004-02-15 11:40:47 0000 -------
Could always 'fix' it in pkg_postinst() ...

------- Comment #8 From Brett I. Holcomb 2004-06-05 20:09:06 0000 -------
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

------- Comment #9 From SpanKY 2004-06-05 20:18:07 0000 -------
it shouldnt be broken after you fix it once

i havent seen it 'come back' on any of my boxes ...

------- Comment #10 From Brett I. Holcomb 2004-06-05 20:32:32 0000 -------
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.

------- Comment #11 From Joe Stroller 2004-06-07 04:48:30 0000 -------
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. 

------- Comment #12 From SpanKY 2004-07-28 15:36:31 0000 -------
seems the permissions get revereted so i'll do as azarah suggested

------- Comment #13 From SpanKY 2004-07-28 15:36:34 0000 -------
*** Bug 58536 has been marked as a duplicate of this bug. ***

------- Comment #14 From SpanKY 2004-07-28 16:09:03 0000 -------
*** Bug 58598 has been marked as a duplicate of this bug. ***

------- Comment #15 From SpanKY 2004-07-28 22:12:25 0000 -------
added to pkg_postinst() ... please try syncing up in a bit and re-emerging man
and see if the errors go away

------- Comment #16 From Mr. Bones. 2004-08-04 10:36:59 0000 -------
*** Bug 59400 has been marked as a duplicate of this bug. ***

------- Comment #17 From Brett I. Holcomb 2004-08-04 16:35:03 0000 -------
I tried it as a user on several and so far it seems to work.

------- Comment #18 From SpanKY 2004-08-17 15:12:01 0000 -------
*** Bug 60710 has been marked as a duplicate of this bug. ***

------- Comment #19 From SpanKY 2004-08-24 12:44:41 0000 -------
*** Bug 61538 has been marked as a duplicate of this bug. ***

------- Comment #20 From L.Stohlmann 2004-08-28 07:17:01 0000 -------
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

------- Comment #21 From SpanKY 2004-08-28 23:26:14 0000 -------
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

------- Comment #22 From SpanKY 2004-08-29 08:30:30 0000 -------
err, not which manpages, but which stage files

First Last Prev Next    No search results available      Search page      Enter new bug