# Portage: spawn: Permission denied [solved]

## manuels

Hi,

ich möchte aus Ubuntu raus mir ein kleines USB-Gentoo mit unionfs-images basteln.

Das ganze soll so laufen.

```
# stage3 basis erstellen

$ ./GentooUSB init ~/MeinUSBGentoo

$ ./GentooUSB enter ~/MeinUSBGentoo # <- "chrootet" und erstellt unionfs snapshot in  ~/MeinUSBGentoo/data/snaps/1

$ ./GentooUSB sync # <- kopiert Daten in ~/MeinUSBGentoo auf eine USB stick von dem man das Linux booten kann

```

Das GentooUSB-Script kann man im pastebin finden.

/proc und /dev werden in diesem Script gemountet.

Wenn ich das Gentoo aber durch "./GentooUSB enter ~/MeinUSBGentoo" betrete und etwas emergen will, bekomm ich ein "Permission denied":

```
$ emerge wpa_supplicant

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Starting parallel fetch

>>> Emerging (1 of 3) dev-libs/libnl-1.1-r1

openpty failed: 'out of pty devices'

[Errno 13] Permission denied:

   /bin/bash -c touch "/usr/portage/distfiles/.__portage_test_write__" 2>/dev/null ; rval=$? ; rm -f  "/usr/portage/distfiles/.__portage_test_write__" ; exit $rval

Traceback (most recent call last):

  File "/usr/lib/portage/pym/portage/process.py", line 249, in spawn

  File "/usr/lib/portage/pym/portage/process.py", line 378, in _exec

  File "/usr/lib/portage/pym/portage/__init__.py", line 209, in __call__

OSError: [Errno 13] Permission denied

[Errno 13] Permission denied:

   /bin/bash -c touch "/usr/portage/distfiles/.locks/.__portage_test_write__" 2>/dev/null ; rval=$? ; rm -f  "/usr/portage/distfiles/.locks/.__portage_test_write__" ; exit $rval

Traceback (most recent call last):

  File "/usr/lib/portage/pym/portage/process.py", line 249, in spawn

  File "/usr/lib/portage/pym/portage/process.py", line 378, in _exec

  File "/usr/lib/portage/pym/portage/__init__.py", line 209, in __call__

OSError: [Errno 13] Permission denied

>>> Downloading 'http://distfiles.gentoo.org/distfiles/libnl-1.1.tar.gz'

[Errno 13] Permission denied:

   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/libnl-1.1.tar.gz http://distfiles.gentoo.org/distfiles/libnl-1.1.tar.gz

Traceback (most recent call last):

  File "/usr/lib/portage/pym/portage/process.py", line 249, in spawn

  File "/usr/lib/portage/pym/portage/process.py", line 378, in _exec

  File "/usr/lib/portage/pym/portage/__init__.py", line 209, in __call__

OSError: [Errno 13] Permission denied

>>> Downloading 'http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/libnl-1.1.tar.gz'

[Errno 13] Permission denied:

   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/libnl-1.1.tar.gz http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/libnl-1.1.tar.gz

Traceback (most recent call last):

  File "/usr/lib/portage/pym/portage/process.py", line 249, in spawn

  File "/usr/lib/portage/pym/portage/process.py", line 378, in _exec

  File "/usr/lib/portage/pym/portage/__init__.py", line 209, in __call__

OSError: [Errno 13] Permission denied

>>> Downloading 'http://people.suug.ch/~tgr/libnl/files/libnl-1.1.tar.gz'

[Errno 13] Permission denied:

   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/libnl-1.1.tar.gz http://people.suug.ch/~tgr/libnl/files/libnl-1.1.tar.gz

Traceback (most recent call last):

  File "/usr/lib/portage/pym/portage/process.py", line 249, in spawn

  File "/usr/lib/portage/pym/portage/process.py", line 378, in _exec

  File "/usr/lib/portage/pym/portage/__init__.py", line 209, in __call__

OSError: [Errno 13] Permission denied

!!! Couldn't download 'libnl-1.1.tar.gz'. Aborting.

 * Fetch failed for 'dev-libs/libnl-1.1-r1', Log file:

 *  '/var/tmp/portage/dev-libs/libnl-1.1-r1/temp/build.log'

>>> Failed to emerge dev-libs/libnl-1.1-r1, Log file:

>>>  '/var/tmp/portage/dev-libs/libnl-1.1-r1/temp/build.log'

 * Messages for package dev-libs/libnl-1.1-r1:

 * Fetch failed for 'dev-libs/libnl-1.1-r1', Log file:

 *  '/var/tmp/portage/dev-libs/libnl-1.1-r1/temp/build.log'

```

Das ist etwas komisch, denn führe ich

```
  /bin/bash -c touch "/usr/portage/distfiles/.__portage_test_write__" 2>/dev/null
```

einfach in der Konsole aus, bekomme ich keine Fehler.

Was läuft hier schief? Ist evtl. Ubuntu verantwortlich?

Hier noch ein paar Infos:

```

# ls -l /usr/portage/ | grep distfiles

drwxrws--- 1 root    portage  4096 15. Apr 14:27 distfiles

# emerge --info

Portage 2.1.7.16 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-20-generic x86_64)

=================================================================

System uname: Linux-2.6.31-20-generic-x86_64-AMD_Turion-tm-_64_X2_Mobile_Technology_TL-50-with-gentoo-1.12.13

Timestamp of tree: Thu, 15 Apr 2010 01:45:01 +0000

app-shells/bash:     4.0_p35

dev-lang/python:     2.6.4

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.63-r1

sys-devel/automake:  1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc:       4.3.4

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="* -@EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LANG="de_DE.UTF-8"

LDFLAGS="-Wl,-O1"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

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"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="acl berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg 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 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

----------

## manuels

Kurzer Zusatz (falls es wichtig ist): Mein "Host"-Ubuntu ist 64-Bit, mein Chroot-Gentoo 32-Bit.

EDIT: Habs, unionfs-fuse -o allow_others hilft!

EDIT2: Man füge noch -o use_ino hinzu. Einmal umrühren. Lecker!

----------

