Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230991 - mail-filter/spamassassin-{3.2.1-r1,3.4.2} - ACCESS DENIED mkdir: /etc/mail/spamassassin
Summary: mail-filter/spamassassin-{3.2.1-r1,3.4.2} - ACCESS DENIED mkdir: /etc/ma...
Status: RESOLVED DUPLICATE of bug 289113
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Perl team
: 268305 (view as bug list)
Depends on:
Reported: 2008-07-06 21:20 UTC by Kevin O'Gorman
Modified: 2009-10-21 21:45 UTC (History)
4 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Kevin O'Gorman 2008-07-06 21:20:45 UTC
This happened on the stable version, so I decided to try the latest.  The emerge fails in both cases with reports of lack of permission on 'mkdir' and 'chmod' commands that work just fine if I do them as root.  I suspect sandbox problems.  

Reproducible: Always

Steps to Reproduce:
1.emerge spamassasin
Actual Results:  
Tail of the emerge output:
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/share/man/man1/spamassassin-run.1
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/share/man/man1/spamc.1
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/share/man/man1/spamassassin.1
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/share/man/man1/sa-update.1
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/share/man/man1/sa-compile.1
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/share/man/man1/spamd.1
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/share/man/man1/sa-learn.1
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/bin/spamassassin
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/bin/sa-compile
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/bin/sa-update
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/bin/sa-learn
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/bin/spamd
Installing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image/usr/bin/spamc
Writing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image//usr/lib/perl5/vendor_perl/5.8.8/i686-linux/auto/Mail/SpamAssassin/.packlist
Appending installation info to /var/tmp/portage/mail-filter/spamassassin-3.2.4/image//usr/lib/perl5/5.8.8/i686-linux/perllocal.pod
/usr/bin/perl5.8.8 "-MExtUtils::Command" -e mkpath /etc/mail/spamassassin
ACCESS DENIED  mkdir:     /etc/mail/spamassassin
mkdir /etc/mail/spamassassin: Permission denied at /usr/lib/perl5/5.8.8/ExtUtils/ line 259
make: [conf__install] Error 13 (ignored)
/usr/bin/perl5.8.8 -MFile::Copy -e "copy(q{rules/}, q{/etc/mail/spamassassin/}) unless -f q{/etc/mail/spamassassin/}"
/usr/bin/perl5.8.8 -MFile::Copy -e "copy(q{rules/init.pre}, q{/etc/mail/spamassassin/init.pre}) unless -f q{/etc/mail/spamassassin/init.pre}"
/usr/bin/perl5.8.8 -MFile::Copy -e "copy(q{rules/v310.pre}, q{/etc/mail/spamassassin/v310.pre}) unless -f q{/etc/mail/spamassassin/v310.pre}"
/usr/bin/perl5.8.8 -MFile::Copy -e "copy(q{rules/v312.pre}, q{/etc/mail/spamassassin/v312.pre}) unless -f q{/etc/mail/spamassassin/v312.pre}"
/usr/bin/perl5.8.8 -MFile::Copy -e "copy(q{rules/v320.pre}, q{/etc/mail/spamassassin/v320.pre}) unless -f q{/etc/mail/spamassassin/v320.pre}"
/usr/bin/perl5.8.8 "-MExtUtils::Command" -e mkpath /usr/share/spamassassin
ACCESS DENIED  mkdir:     /usr/share/spamassassin
mkdir /usr/share/spamassassin: Permission denied at /usr/lib/perl5/5.8.8/ExtUtils/ line 259
make: [data__install] Error 13 (ignored)
/usr/bin/perl5.8.8 -e "map unlink, </usr/share/spamassassin/*>"
/usr/bin/perl build/preprocessor -Mvars -DVERSION="3.002004" -DPREFIX="/usr" -DDEF_RULES_DIR="/usr/share/spamassassin" -DLOCAL_RULES_DIR="/etc/mail/spamassassin" -DLOCAL_STATE_DIR="/var/lib/spamassassin" -DINSTALLSITELIB="/usr/lib/perl5/vendor_perl/5.8.8" -DCONTACT_ADDRESS="the administrator of that system" -m644 -Irules -O/usr/share/spamassassin user_prefs.template languages sa-update-pubkey.txt
Cannot open /usr/share/spamassassin/ No such file or directory at build/preprocessor line 127.
make: *** [data__install] Error 2
 * ERROR: mail-filter/spamassassin-3.2.4 failed.
 * Call stack:
 *     , line   49:  Called src_install
 *             environment, line 2409:  Called perl-module_src_install
 *             environment, line 2062:  Called die
 * The specific snippet of code:
 *           make ${myinst} ${mytargets} || die;
 *  The die message:
 *   (no error message)
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/mail-filter/spamassassin-3.2.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/mail-filter/spamassassin-3.2.4/temp/environment'.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-12153.log"

mkdir:     /etc/mail/spamassassin
mkdir:     /usr/share/spamassassin
treat mail # 

Expected Results:  
completed emergence

# emerge --info
Portage (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8-kosmanor i686)
System uname: 2.6.24-gentoo-r8-kosmanor i686 Intel(R) XEON(TM) CPU 1.80GHz
Timestamp of tree: Sat, 05 Jul 2008 07:45:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
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
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe -mfpmath=sse -msse2 -mmmx"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe -mfpmath=sse -msse2 -mmmx"
FEATURES="buildpkg distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
LINGUAS="en fr de es pl"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X Xaw3d acl acpi aim alsa apache2 apm bash-completion bcmath berkdb branding bzip2 cairo calendar caps cdr cli cracklib crypt cscope ctype cups dbm dbus dri dvd dvdr dvdread eds emboss encode esd evo exif fam fastcgi foomaticdb fortran gdbm gif gnome gphoto2 gpm gstreamer gtk guile hal iconv icq imap imlib ipv6 isdnlog java joystick jpeg kde kerberos ldap libnotify libwww mad mailwrapper mbox mcal midi mikmod mime mmap mmx motif mp3 mpeg mpi mudflap mysql ncurses nis nls nptl nptlonly nsplugin odbc offensive ogg openal opengl openmp oscar pam pcre pdf perl pic png posix postgres ppds pppd python qt3 qt3support qt4 quicktime readline reflection ruby samba sdl session snmp sockets spell spl sse ssl startup-notification svg svga symlink sysvipc tcpd tetex tiff tk truetype unicode usb vorbis win32codecs x86 xml xorg xpm xulrunner xv yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fr de es pl" USERLAND="GNU" VIDEO_CARDS="vga fbdev fglrx vesa"
Comment 1 Matthew Gregory Sr. 2009-02-05 23:50:51 UTC
I too ran into this.  I am manually working around it but it looks like this is getting called by the portage user and that's why the access denied.
Comment 2 Matthew Gregory Sr. 2009-02-05 23:59:39 UTC
I have verified that this happens in all versions.

Manuall install from /var/tmp/portage/mail-filter/spamassassin-<version>/work/Mail-SpamAssassin-<version> works as root
Comment 3 Andrew Evans 2009-03-09 06:59:46 UTC

Thanks to Matthew Gregory for the fix. The actual commands are:

# cd /var/tmp/portage/mail-filter/spamassassin-<version>/work/Mail-SpamAssassin-<version>
# make install
# . /etc/make.conf
# ebuild $PORTDIR/mail-filter/spamassassin/spamassassin-<version>.ebuild qmerge
# cd ../../..
# rm -rf spamassassin-*

Severity needs a bump to 'critical'. This broke spamassassin on my system for a couple days, deluging me with spam. E-mail is unusable in this day and age without spam filtering, and it took me hours to find this fix. This needs to be fixed immediately.
Comment 4 Ryan 2009-07-27 16:54:23 UTC
I was having this same problem workaround / fix:

FEATURES="-sandbox" emerge -va spamassassin

Allows it to merge successfully
Comment 5 David Abbott gentoo-dev 2009-09-09 23:54:34 UTC
*** Bug 268305 has been marked as a duplicate of this bug. ***
Comment 6 Peter Alfredsen (RETIRED) gentoo-dev 2009-10-21 21:45:30 UTC
Marking this a duplicate of the newer bug since I just attached a patch to that one.

*** This bug has been marked as a duplicate of bug 289113 ***