Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250389 - emerge can not download the packages
Summary: emerge can not download the packages
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-09 13:35 UTC by radim
Modified: 2009-11-13 04:15 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description radim 2008-12-09 13:35:18 UTC
Tryiing to emerge anything I get the error "[Errno 13] Permission denied:" And the file is not downloaded.

But if I run the wget directly the file is downloaded, and then I can run the emerge and the instalation works ok.

Reproducible: Always

Steps to Reproduce:
1.emerge "anything"
2.
3.

Actual Results:  
>>> Verifying ebuild manifests

>>> Starting parallel fetch

>>> Emerging (1 of 7) sys-libs/timezone-data-2008i
rm: cannot remove `/usr/portage/distfiles/.__portage_test_write__': Permission denied
rm: cannot remove `/usr/portage/distfiles/.locks/.__portage_test_write__': Permission denied
>>> Downloading 'rsync://192.168.1.1/gentoo-portage/distfiles/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz rsync://192.168.1.1/gentoo-portage/distfiles/distfiles/tzcode2008h.tar.gz
>>> Downloading 'rsync://192.168.1.1/gentoo-portage/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz rsync://192.168.1.1/gentoo-portage/distfiles/tzcode2008h.tar.gz
>>> Downloading 'rsync://ftp6.linux.cz/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz rsync://ftp6.linux.cz/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'rsync://ftp.fi.muni.cz/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz rsync://ftp.fi.muni.cz/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.tu-clausthal.de/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.tu-clausthal.de/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://ftp.jaist.ac.jp/pub/Linux/Gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://ftp.jaist.ac.jp/pub/Linux/Gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://mirrors.tds.net/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://mirrors.tds.net/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.osuosl.org/pub/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.osuosl.org/pub/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://gentoo.mirrors.pair.com/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://gentoo.mirrors.pair.com/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://gentoo.osuosl.org/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://gentoo.osuosl.org/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://cudlug.cudenver.edu/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://cudlug.cudenver.edu/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://mirror.ovh.net/gentoo-distfiles/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://mirror.ovh.net/gentoo-distfiles/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://cudlug.cudenver.edu/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://cudlug.cudenver.edu/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.free.fr/mirrors/ftp.gentoo.org/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.free.fr/mirrors/ftp.gentoo.org/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.ussg.iu.edu/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.ussg.iu.edu/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://open-systems.ufl.edu/mirrors/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://open-systems.ufl.edu/mirrors/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.gentoo.mesh-solutions.com/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.gentoo.mesh-solutions.com/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://elsie.nci.nih.gov/pub/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://elsie.nci.nih.gov/pub/tzcode2008h.tar.gz
!!! Couldn't download 'tzcode2008h.tar.gz'. Aborting.
 * Fetch failed for 'sys-libs/timezone-data-2008i', Log file:
 *  '/var/tmp/portage/sys-libs/timezone-data-2008i/temp/build.log'

>>> Failed to emerge sys-libs/timezone-data-2008i, Log file:

>>>  '/var/tmp/portage/sys-libs/timezone-data-2008i/temp/build.log'

Expected Results:  
file is downloaded

the some problem even with stable version of portage

emerge --info
Portage 2.2_rc17 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r4-i686-Intel-R-_Pentium-R-_M_processor_1.73GHz-with-glibc2.0
Timestamp of tree: Tue, 09 Dec 2008 07:32:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r9, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.2
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.4_p6, 1.5, 1.6.3, 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="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"
CHOST="i686-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"
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=pentium-m -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="rsync://192.168.1.1/gentoo-portage/distfiles rsync://192.168.1.1/gentoo-portage/ rsync://ftp6.linux.cz/pub/linux/gentoo/ rsync://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo"
LANG="cs_CZ.UTF-8"
LDFLAGS=""
LINGUAS="cs us"
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/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X acl acpi alsa berkdb bluetooth cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo faad fam firefox fortran gdbm gif gpm gstreamer gtk hal iconv ipv6 isdnlog jack java jpeg kde kerberos ldap mad midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png pppd python qt qt3 qt3support qt4 quicktime readline reflection sdl session slang spell spl ssl svg tcpd tiff truetype unicode usb vorbis win32codecs x86 xml xorg xv xvid zlib" ALSA_CARDS="hda-intel" 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="cs us" USERLAND="GNU" VIDEO_CARDS="i810 i915"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-09 13:44:26 UTC
That's because portage is using FEATURES=userfetch by default (iirc), which downloads files as the portage user. What are the permissions on your distfiles dir? Post the output of 'ls -ld /usr/portage /usr/portage/distfiles', please.
Comment 2 radim 2008-12-09 16:49:44 UTC
ls -ld /usr/portage /usr/portage/distfiles
drwxr-xr-x 159 root root    4800  9. pro 08.56 /usr/portage
drwxrwsr-x   4 root portage 4768  9. pro 14.30 /usr/portage/distfiles

after  chmod o+w /usr/portage/distfiles/
rad_book radar # ls -ld /usr/portage /usr/portage/distfiles
drwxr-xr-x 159 root root    4800  9. pro 08.56 /usr/portage
drwxrwsrwx   4 root portage 4768  9. pro 14.30 /usr/portage/distfiles

No change:

nice -n 19 emerge -av sys-libs/timezone-data x11-proto/inputproto

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] sys-libs/timezone-data-2008i [2008g-r1] USE="nls" 356 kB
[ebuild     U ] x11-proto/inputproto-1.5.0 [1.4.4] 57 kB

Total: 2 packages (2 upgrades), Size of downloads: 412 kB

Would you like to merge these packages? [Yes/No] 

>>> Verifying ebuild manifests

>>> Starting parallel fetch

>>> Emerging (1 of 2) sys-libs/timezone-data-2008i
rm: cannot remove `/usr/portage/distfiles/.__portage_test_write__': Permission denied
Adjusting permissions recursively: '/usr/portage/distfiles/'
rm: cannot remove `/usr/portage/distfiles/.locks/.__portage_test_write__': Permission denied
>>> Downloading 'rsync://192.168.1.1/gentoo-portage/distfiles/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz rsync://192.168.1.1/gentoo-portage/distfiles/distfiles/tzcode2008h.tar.gz
>>> Downloading 'rsync://192.168.1.1/gentoo-portage/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz rsync://192.168.1.1/gentoo-portage/distfiles/tzcode2008h.tar.gz
>>> Downloading 'rsync://ftp6.linux.cz/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz rsync://ftp6.linux.cz/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'rsync://ftp.fi.muni.cz/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz rsync://ftp.fi.muni.cz/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.tu-clausthal.de/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.tu-clausthal.de/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.ussg.iu.edu/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.ussg.iu.edu/pub/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.gentoo.mesh-solutions.com/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.gentoo.mesh-solutions.com/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://open-systems.ufl.edu/mirrors/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://open-systems.ufl.edu/mirrors/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://mirrors.tds.net/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://mirrors.tds.net/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://cudlug.cudenver.edu/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://cudlug.cudenver.edu/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://ftp.jaist.ac.jp/pub/Linux/Gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://ftp.jaist.ac.jp/pub/Linux/Gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://mirror.ovh.net/gentoo-distfiles/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://mirror.ovh.net/gentoo-distfiles/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://cudlug.cudenver.edu/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://cudlug.cudenver.edu/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://gentoo.mirrors.pair.com/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://gentoo.mirrors.pair.com/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://gentoo.osuosl.org/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://gentoo.osuosl.org/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.free.fr/mirrors/ftp.gentoo.org/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.free.fr/mirrors/ftp.gentoo.org/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://ftp.osuosl.org/pub/gentoo/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://ftp.osuosl.org/pub/gentoo/distfiles/tzcode2008h.tar.gz
>>> Downloading 'ftp://elsie.nci.nih.gov/pub/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz ftp://elsie.nci.nih.gov/pub/tzcode2008h.tar.gz
!!! Couldn't download 'tzcode2008h.tar.gz'. Aborting.
 * Fetch failed for 'sys-libs/timezone-data-2008i', Log file:
 *  '/var/tmp/portage/sys-libs/timezone-data-2008i/temp/build.log'

>>> Failed to emerge sys-libs/timezone-data-2008i, Log file:

>>>  '/var/tmp/portage/sys-libs/timezone-data-2008i/temp/build.log'
Comment 3 Zac Medico gentoo-dev 2008-12-09 17:50:02 UTC
(In reply to comment #2)
> ls -ld /usr/portage /usr/portage/distfiles
> drwxr-xr-x 159 root root    4800  9. pro 08.56 /usr/portage
> drwxrwsr-x   4 root portage 4768  9. pro 14.30 /usr/portage/distfiles

Those permissions appear to be correct, so the errors don't make sense. Try creating a new directory to see if that makes any difference:

  mv /usr/portage/distfiles /usr/portage/distfiles.old
  mkdir /usr/portage/distfiles
  mv /usr/portage/distfiles.old/* /usr/portage/distfiles
  rm -rf /usr/portage/distfiles.old

The permissions on the new directory should be automatically adjusted by portage, so you shouldn't have to use chmod or chown.
Comment 4 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-09 17:52:04 UTC
Is your /usr/portage on NFS?
Comment 5 radim 2008-12-09 21:11:00 UTC
no the it is on local disk I, using reiserfs.

But it worked goog until last nice -n 19 emerge -avu world
Comment 6 radim 2008-12-09 21:15:35 UTC
making new directory did not help also

rad_book radar # mv /usr/portage/distfiles /usr/portage/distfiles.old
rad_book radar # mkdir /usr/portage/distfiles
rad_book radar # mv /usr/portage/distfiles.old/* /usr/portage/distfiles
rad_book radar # rm -rf /usr/portage/distfiles.old

ls -ld /usr/portage /usr/portage/distfiles
drwxr-xr-x 159 root root 4800  9. pro 22.14 /usr/portage
drwxrwx---   3 root root 4744  9. pro 22.14 /usr/portage/distfiles

rad_book radar # nice -n 19 emerge -avu world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] sys-libs/timezone-data-2008i [2008g-r1] USE="nls" 356 kB
[ebuild     U ] net-print/cups-1.3.9-r1 [1.3.8-r2] USE="X acl dbus java jpeg kerberos ldap pam perl png python ssl tiff -avahi -gnutls -php -ppds -samba -slp -static -xinetd -zeroconf" LINGUAS="-de -en -es -et -fr -he -id -it -ja -pl -sv -zh_TW" 3,901 kB
[ebuild     U ] x11-proto/inputproto-1.5.0 [1.4.4] 57 kB
[ebuild  NS   ] sys-kernel/gentoo-sources-2.6.27-r5 [2.6.27-r4] USE="-build -symlink" 171 kB
[ebuild     U ] x11-terms/xterm-237 [235] USE="truetype unicode -Xaw3d -paste64 -toolbar" 841 kB
[ebuild     U ] x11-libs/gtk+-2.14.5 [2.14.4] USE="X cups jpeg tiff -debug -doc -jpeg2k -vim-syntax -xinerama" 17,018 kB
[ebuild     U ] www-client/mozilla-firefox-3.0.4-r2 [3.0.4-r1] USE="dbus ipv6 java xulrunner -bindist -custom-optimization -gnome -iceweasel -mozdevelop -restrict-javascript -startup-notification" LINGUAS="cs -af -ar -be -bg -bn -bn_IN -ca -cy -da -de -el -en -en_GB -en_US -eo -es -es_AR -es_ES -et -eu -fi -fr -fy -fy_NL -ga -ga_IE -gl -gu -gu_IN -he -hi -hi_IN -hu -id -is -it -ja -ka -kn -ko -ku -lt -lv -mk -mn -mr -nb -nb_NO -nl -nn -nn_NO -oc -pa -pa_IN -pl -pt -pt_BR -pt_PT -ro -ru -si -sk -sl -sq -sr -sv -sv_SE -te -th -tr -uk -zh -zh_CN -zh_TW" 0 kB

Total: 7 packages (6 upgrades, 1 in new slot), Size of downloads: 22,341 kB

Would you like to merge these packages? [Yes/No] 

>>> Verifying ebuild manifests

>>> Starting parallel fetch

>>> Emerging (1 of 7) sys-libs/timezone-data-2008i
rm: cannot remove `/usr/portage/distfiles/.__portage_test_write__': Permission denied
Adjusting permissions recursively: '/usr/portage/distfiles/'
>>> Downloading 'rsync://192.168.1.1/gentoo-portage/distfiles/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/tzcode2008h.tar.gz rsync://192.168.1.1/gentoo-portage/distfiles/distfiles/tzcode2008h.tar.gz
>>> Downloading 'rsync://192.168.1.1/gentoo-portage/distfiles/tzcode2008h.tar.gz'
[Errno 13] Permission denied:
...

ls -ld /usr/portage /usr/portage/distfiles
drwxr-xr-x 159 root root    4800  9. pro 22.11 /usr/portage
drwxrws---   4 root portage 4768  9. pro 22.12 /usr/portage/distfiles
Comment 7 Zac Medico gentoo-dev 2008-12-09 21:25:10 UTC
Maybe your portage user/group are broken somehow. For example, it the portage user isn't in the portage group then it might trigger this behavior. Do the portage user and group entries look normal in /etc/passwd and /etc/group?
Comment 8 radim 2008-12-09 21:48:19 UTC
less /etc/group | grep portage
portage:x:250:portage

less /etc/passwd | grep portage
portage:x:250:250:portage:/var/tmp/portage:/bin/false
sshd:x:22:22:added by portage for openssh:/var/empty:/bin/false
cron:x:16:16:added by portage for cronbase:/var/spool/cron:/bin/false
rpc:x:111:111:added by portage for portmap:/dev/null:/bin/false
ntp:x:123:123:added by portage for ntp:/dev/null:/bin/false
games:x:36:35:added by portage for cube:/usr/games:/bin/bash
messagebus:x:101:408:added by portage for dbus:/dev/null:/usr/sbin/nologin
ldap:x:439:439:added by portage for openldap:/usr/lib/openldap:/usr/sbin/nologin
gkrellmd:x:102:441:added by portage for gkrellm:/dev/null:/usr/sbin/nologin
clamav:x:103:442:added by portage for clamav:/dev/null:/sbin/nologin
haldaemon:x:104:443:added by portage for hal:/dev/null:/sbin/nologin
dhcp:x:105:445:added by portage for dhcp:/var/lib/dhcp:/sbin/nologin
Comment 9 radim 2008-12-09 21:49:06 UTC
Jus to make the info complete
 
uname -a
Linux rad_book 2.6.27-gentoo-r4 #6 SMP Mon Dec 8 07:13:38 CET 2008 i686 Intel(R) Pentium(R) M processor 1.73GHz GenuineIntel GNU/Linux
Comment 10 Marius Mauch (RETIRED) gentoo-dev 2008-12-09 22:46:11 UTC
Can you download the files manually to /usr/portage/distfiles with uid=portage, e.g. with `su -s /bin/bash portage -c 'wget ...'` ?
Comment 11 radim 2008-12-10 06:46:07 UTC
radar@rad_book ~ $ su -s /bin/bash portage -c 'wget -t 5 -T 60 --passive-ftp -O
/usr/portage/distfiles/tzcode2008h.tar.gz http://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz'
Heslo: 
su: Autentizační služba nemůže získat informace pro autentizaci

radar@rad_book ~ $ su
Heslo: 
rad_book radar # /bin/bash portage -c 'wget -t 5 -T 60 --passive-ftp -O
> /usr/portage/distfiles/tzcode2008h.tar.gz http://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz'
/bin/bash: portage: není souborem ani adresářem

rad_book radar # portage -c 'wget -t 5 -T 60 --passive-ftp -O
/usr/portage/distfiles/tzcode2008h.tar.gz http://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz'
bash: portage: command not found
Comment 12 Marius Mauch (RETIRED) gentoo-dev 2008-12-10 12:56:06 UTC
(In reply to comment #11)
> radar@rad_book ~ $ su -s /bin/bash portage -c 'wget -t 5 -T 60 --passive-ftp -O
> /usr/portage/distfiles/tzcode2008h.tar.gz
> http://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz'
> Heslo: 
> su: Autentizační služba nemůže získat informace pro autentizaci

Sorry, forgot to mention that you must run that command as root. And it would also be good to `export LC_MESSAGES=C` to get english error messages.
Comment 13 radim 2008-12-10 13:39:02 UTC
radar@rad_book ~ $ su
Heslo: 
rad_book radar # export LC_MESSAGES=C
rad_book radar # su -s /bin/bash portage -c 'wget /usr/portage/distfiles/tzcode2008h.tar.gz http://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz'
su: Authentication service cannot retrieve authentication info
(Ignored)
/bin/bash: wget: command not found

rad_book radar # su -s /bin/bash portage -c '/usr/bin/wget /usr/portage/distfiles/tzcode2008h.tar.gz http://mirror.bytemark.co.uk/gentoo/distfiles/tzcode2008h.tar.gz'
su: Authentication service cannot retrieve authentication info
(Ignored)
/bin/bash: /usr/bin/wget: Permission denied
Comment 14 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-10 13:42:51 UTC
This one seems to just get weirder and weirder. I'm going to go out on a limb here and say that your reiserfs needs a good fsck'ing.
Comment 15 radim 2008-12-10 14:01:30 UTC
I already tried to fsck it.

I used
fsck.reiserfs --fix-fixable
and

fsck.reiserfs --adjust-size

it did not helped
Comment 16 Marius Mauch (RETIRED) gentoo-dev 2008-12-10 17:09:11 UTC
What are the permissions on /usr/bin/wget (`ls -l /usr/bin/wget` output)?
Comment 17 radim 2008-12-10 18:13:58 UTC
ls -l /usr/bin/wget
-rwxr-xr-x 1 root root 209620 16. kvě  2008 /usr/bin/wget
Comment 18 radim 2008-12-10 20:25:42 UTC
it is realy interesting because
nice -n 19 emerge -av --sync
works like charm
Comment 19 radim 2008-12-11 08:52:02 UTC
Could it be because of this?
wnen as root I do:
su portage
su: Authentication service cannot retrieve authentication info
(Ignored)

Comment 20 Marius Mauch (RETIRED) gentoo-dev 2008-12-11 14:15:37 UTC
(In reply to comment #19)
> Could it be because of this?
> wnen as root I do:
> su portage
> su: Authentication service cannot retrieve authentication info
> (Ignored)

No, that's normal.
Comment 21 Zac Medico gentoo-dev 2008-12-11 18:31:01 UTC
You might try setting DISTDIR to some other location with a different file system type, just to see if it makes any difference.

FWIW, you can set FEATURES="-userfetch" in /etc/make.conf to force it to fetch with root privileges.
Comment 22 radim 2008-12-11 20:33:32 UTC
Thank you this works. Fo me the problem is solved. 
If anybody have an idea what to try to have it running without FEATURES="-userfetch". Let me know I'm ready to to test.
:-)
Comment 23 Christian Bayer 2009-05-06 18:19:43 UTC
I had EXACTLY the same problem... very strange. I copied over the entire installation from another machine and made a mistake - the /usr directory was in mode 700, so no ordinary user could go to /usr/bin and execute anything - in particular the user portage could not execute /usr/bin/wget. this is what all the permission denied errors are about - no one has the permission enter /usr...
Comment 24 Bernard Tremblay 2009-05-11 22:25:17 UTC
(In reply to comment #23)
> I had EXACTLY the same problem... very strange. I copied over the entire
> installation from another machine and made a mistake - the /usr directory was
> in mode 700, so no ordinary user could go to /usr/bin and execute anything - in
> particular the user portage could not execute /usr/bin/wget. this is what all
> the permission denied errors are about - no one has the permission enter
> /usr...
> 
I just started this weekend (may 9th,2009) to have the same bug.  It came after an update from portage, I have absolutely no idea why...  The "-userfetch" solved the thing.  But I don't like the idea of having to run portage as root.  My permissions on /usr, /usr/bin are ok.  Could it be a bug we got from a previous portage update ? 



Comment 25 Ben Peddell 2009-10-07 06:19:20 UTC
I had the same problem

It turned out that one of the parent directories of the distfiles directory had permissions denying portage access.
Comment 26 Konstantin Bryzgalov 2009-11-13 04:15:27 UTC
This problem accuire if you make copy system to system with dump/restore utilites and answer "y" to question  "set owner/mode for '.'?"

This is effect, cause - lost right permission.

Sorry for my english

Bryzgalov Konstantin