Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 249438 - sys-apps/portage-2.2_rc16 FEATURES="userpriv" - /dev/null: Permission denied
Summary: sys-apps/portage-2.2_rc16 FEATURES="userpriv" - /dev/null: Permission denied
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High major
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-01 04:03 UTC by Patrick Libby
Modified: 2008-12-02 00:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Run of emerge -1v portage (emerge_portage.txt,5.96 KB, text/plain)
2008-12-01 04:05 UTC, Patrick Libby
Details
Run of emerge -1v wine (emerge_wine.txt,5.44 KB, text/plain)
2008-12-01 04:07 UTC, Patrick Libby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Libby 2008-12-01 04:03:29 UTC
When run with FEATURES="userpriv" portage fails with many error messages complaining about things like "hasq: command not found", "/dev/null: permission denied" and similar.

When run with FEATURES="-userpriv" portage works without nary a complaint.

Despite the crash I'm marking this only as major because there is an easy workaround, even if it is less secure.


Reproducible: Always

Steps to Reproduce:
1. set FEATURES to contain "userpriv"
2. run `emerge foo`
3. crashes
4. remove "userpriv" from FEATURES
5. rerun `emerge foo`
6. compiles

Actual Results:  
Portage crashes whenever it is run with userpriv enabled. when userpriv is disabled the problems disappear.

Expected Results:  
Portage to work with FEATURES="userpriv"

Portage 2.2_rc16 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7.Sakura x86_64)
=================================================================
System uname: Linux-2.6.25-gentoo-r7.Sakura-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-glibc2.2.5
Timestamp of tree: Sat, 29 Nov 2008 17:45:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe "
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe "
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="ftp://gentoo.llarian.net/pub/gentoo ftp://gentoo.cites.uiuc.edu/pub/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/jokey /usr/portage/local/layman/armagetron /usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 ao audiofile berkdb bluetooth branding bzip2 cairo cddb cdio cdr cli cracklib crypt cups dbus dga dri dts dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox flac fortran ftp gdbm gif gnome gnome-keyring gpm gstreamer gtk hal iconv imagemagick ipod ipv6 isdnlog java jpeg ldap libnotify libsamplerate lzo mad matroska matrox midi mikmod mmap mmx mmxext mp3 mp4 mpeg mplayer mudflap multilib musepack musicbrainz nautilus ncurses nls nptl nptlonly nsplugin ogg ogm opengl openmp pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection sdl session smp spell spl sqlite sse sse2 ssl startup-notification svg sysfs tcpd theora threads tiff tk truetype unicode usb vorbis wavpack x264 xine xinerama xml xorg xprint xscreensaver xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Sakura portage #
Comment 1 Patrick Libby 2008-12-01 04:05:01 UTC
Created attachment 173920 [details]
Run of emerge -1v portage

Output from tryint to emerge portage with userpriv turned on
Comment 2 Patrick Libby 2008-12-01 04:07:14 UTC
Created attachment 173922 [details]
Run of emerge -1v wine

Trying to run emerge wine...
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-12-02 00:09:22 UTC
Let's assume for the moment that /dev/null should always be accessible to all users, and that you therefore need to provide some basic information about your /dev/null (`stat /dev/null'). If that looks normal, then maybe you have set up ACLs that forbid some users to access /dev/null?
Comment 4 Patrick Libby 2008-12-02 00:30:39 UTC
(In reply to comment #3)
> Let's assume for the moment that /dev/null should always be accessible to all
> users, and that you therefore need to provide some basic information about your
> /dev/null (`stat /dev/null'). If that looks normal, then maybe you have set up
> ACLs that forbid some users to access /dev/null?
> 

Hmm.... Well thats interesting...

Yep. that fixed it. 

For some reason /dev/null ended up with read/write permissions denied to all

Sakura dragonfly # stat /dev/null
  File: `/dev/null'
  Size: 0               Blocks: 0          IO Block: 4096   character special file
Device: fh/15d  Inode: 137         Links: 1     Device type: 1,3
Access: (0111/c--x--x--x)  Uid: (    0/    root)   Gid: (    6/    disk)
Access: 2008-12-01 08:52:48.938256911 -0500
Modify: 2008-12-01 08:52:48.938256911 -0500
Change: 2008-12-01 08:52:48.938256911 -0500
Sakura dragonfly # ls -l /dev/null
c--x--x--x 1 root disk 1, 3 2008-12-01 08:52 /dev/null

Change the permissions to something more sane and userpriv works again. with nary a complaint.

Now to figure out WHY /dev/null ended up with such odd permissions and fix THAT.