View previous topic :: View next topic |
Author |
Message |
l33tmmx Tux's lil' helper
Joined: 12 Mar 2005 Posts: 111 Location: Pirkkala, Finland
|
Posted: Wed Oct 07, 2015 6:26 pm Post subject: Problem with live ebuilds: "Permission denied" |
|
|
For some reason I'm unable to emerge any of the live (i.e. -9999 and such) ebuilds, portage is seemingly having a permission problem. Here's an example of a recent try of emerging media-gfx/photivo-9999:
Code: | wintermute # emerge -av photivo
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild U *] media-gfx/photivo-9999::gentoo [0_pre20131115::gentoo] USE="gimp" 0 KiB
Total: 1 package (1 upgrade), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) media-gfx/photivo-9999::gentoo
>>> Failed to emerge media-gfx/photivo-9999, Log file:
>>> '/var/tmp/portage/media-gfx/photivo-9999/temp/build.log'
>>> Jobs: 0 of 1 complete, 1 failed Load avg: 0.94, 0.66, 0.53
* Package: media-gfx/photivo-9999
* Repository: gentoo
* Maintainer: opensource@andmarios.com proxy-maint@gentoo.org
* Upstream: https://code.google.com/p/photivo/issues/list
* USE: abi_x86_64 amd64 elibc_glibc gimp kernel_linux userland_GNU
* FEATURES: preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
mkdir: cannot create directory ‘/mnt/data/distfiles/hg-src’: Permission denied
* ERROR: media-gfx/photivo-9999::gentoo failed (unpack phase):
* failed to create /mnt/data/distfiles/hg-src/photivo
*
* Call stack:
* ebuild.sh, line 90: Called src_unpack
* environment, line 2347: Called mercurial_src_unpack
* environment, line 1849: Called mercurial_fetch
* environment, line 1821: Called die
* The specific snippet of code:
* mkdir -p "${EHG_STORE_DIR}/${EHG_PROJECT}" || die "failed to create ${EHG_STORE_DIR}/${EHG_PROJECT}";
* |
I'm getting similar styled, permissions-related errors regardless of whether it is a mercurial, git, cvs or some other live ebuild. All "normal", tarball based ebuilds work fine, though.
I've made sure that everything within the distfiles directory is owned by portage
Code: | chown -R portage:portage /mnt/data/distfiles |
, and also tried creating the directories manually, but still the abovementioned happens...
I suppose it is something simple; unfortunately I cannot figure out for myself what's wrong _________________ "Trust me, I know what I'm doing!"
- Sledge Hammer |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Wed Oct 07, 2015 10:33 pm Post subject: |
|
|
Try FEATURES="-userpriv" From the description of this feature turning it off makes no sense, yet I have to do that on one of my systems.
Also: Code: | chown -R portage:portage /mnt/data |
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21431
|
Posted: Thu Oct 08, 2015 2:46 am Post subject: |
|
|
What is the output of ls -ld /{,mnt{,/,/data{,/,/distfiles{,/,/hg-src{,/,/photivo}}}}}? Yes, I intend to have that many combinations of bare, trailing slash, and subdirectory. |
|
Back to top |
|
|
l33tmmx Tux's lil' helper
Joined: 12 Mar 2005 Posts: 111 Location: Pirkkala, Finland
|
Posted: Thu Oct 08, 2015 6:27 pm Post subject: |
|
|
Thanks, the FEATURES="-userpriv" did the trick!
Which one would be better in the future, to disable userpriv globally or just disable it temporarily when ebuilds give trouble? I have to admit that I don't really understand the sandbox vs. userpriv stuff. _________________ "Trust me, I know what I'm doing!"
- Sledge Hammer |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Thu Oct 08, 2015 8:09 pm Post subject: |
|
|
l33tmmx wrote: | Thanks, the FEATURES="-userpriv" did the trick! Which one would be better in the future, to disable userpriv globally or just disable it temporarily when ebuilds give trouble? I have to admit that I don't really understand the sandbox vs. userpriv stuff. |
l33tmmx, Tony0945 ... userpriv isn't the issue, it shouldn't need disabled. The issue, as Hu suggests, is permissions. I'd post the output of the command Hu provided ... the output of mount | grep '/mnt/data' might also help.
best ... khay |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Oct 08, 2015 9:05 pm Post subject: |
|
|
Here's mine (after correcting the path for my machine):
Code: | drwxr-xr-x 22 root root 4096 Oct 4 11:44 /
drwxr-xr-x 14 root root 4096 Sep 7 2014 /usr
drwxr-xr-x 14 root root 4096 Sep 7 2014 /usr/
drwxr-xr-x 172 portage portage 4096 Sep 25 19:39 /usr/portage
drwxr-xr-x 172 portage portage 4096 Sep 25 19:39 /usr/portage/
drwxrwsr-x 5 portage portage 192512 Oct 8 14:01 /usr/portage/distfiles
drwxrwsr-x 5 portage portage 192512 Oct 8 14:01 /usr/portage/distfiles/
drwxrwsr-x 3 portage portage 4096 Mar 7 2012 /usr/portage/distfiles/hg-src
drwxrwsr-x 3 portage portage 4096 Mar 7 2012 /usr/portage/distfiles/hg-s |
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Oct 09, 2015 7:30 am Post subject: |
|
|
Tony0945 wrote: | Here's mine (after correcting the path for my machine): |
Tony ... are you having the same issue as the OP? Also, they shouldn't need to be SGID
Code: | # ls -ld /usr/src{,/distfiles{,/git3-src}}
drwxr-xr-x 8 root root 4096 2015-08-04 16:28 /usr/src/
drwxrwxr-x 5 portage portage 45056 2015-10-07 08:54 /usr/src/distfiles/
drwxr-xr-x 5 portage portage 4096 2014-04-18 13:45 /usr/src/distfiles/git3-src/ |
... you can unset SGID with the following:
Code: | # chmod -R g-s /usr/portage/distfiles |
best ... khay |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Oct 09, 2015 1:22 pm Post subject: |
|
|
Unset SGID and removed -userpriv. Had a little problem syncing with my server but eventually downloaded from another server. Will monitor, thanks!
Edit: Had a problem fetching new opera-beta from my local server. Unset SGID on the server and problem went away. Will check my other boxen. Don't know how those bits got set unless it was when transferring files with either samba (probably) or scp. |
|
Back to top |
|
|
l33tmmx Tux's lil' helper
Joined: 12 Mar 2005 Posts: 111 Location: Pirkkala, Finland
|
Posted: Mon Oct 12, 2015 5:20 am Post subject: |
|
|
A bit late answer, sorry! Here's my output:
Code: | drwxr-xr-x 24 root root 4096 23. 3. 2015 /
drwxr-xr-x 13 root root 4096 16. 1. 2013 /mnt
drwxr-xr-x 13 root root 4096 16. 1. 2013 /mnt/
drwxrwxrwx 21 root root 4096 11.10. 18:07 /mnt/data
drwxrwxrwx 21 root root 4096 11.10. 18:07 /mnt/data/
drwxrwxr-x 6 portage portage 200704 10.10. 22:07 /mnt/data/distfiles
drwxrwxr-x 6 portage portage 200704 10.10. 22:07 /mnt/data/distfiles/
drw-rw-r-- 4 portage portage 33 7.10. 20:18 /mnt/data/distfiles/hg-src
drw-rw-r-- 4 portage portage 33 7.10. 20:18 /mnt/data/distfiles/hg-src/
drwxrwxr-x 3 portage portage 20 8.10. 21:15 /mnt/data/distfiles/hg-src/photivo |
I had to move the distfiles directory to another physical drive mounted on /mnt/data... well, much over a year ago, when I ran out of space on the root drive. The /distfiles is just a subdirectory on /mnt/data, the rest is user-writable storage for rarely used stuff. _________________ "Trust me, I know what I'm doing!"
- Sledge Hammer |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Oct 12, 2015 10:09 am Post subject: |
|
|
l33tmmx wrote: | Code: | drw-rw-r-- 4 portage portage 33 7.10. 20:18 /mnt/data/distfiles/hg-src/
drwxrwxr-x 3 portage portage 20 8.10. 21:15 /mnt/data/distfiles/hg-src/photivo |
|
l33tmmx ... you need +x to be able to access the directory ...
Code: | # find /mnt/data/distfiles -type d -exec chmod ug+x "{}" \; |
best ... khay |
|
Back to top |
|
|
l33tmmx Tux's lil' helper
Joined: 12 Mar 2005 Posts: 111 Location: Pirkkala, Finland
|
Posted: Mon Oct 12, 2015 5:57 pm Post subject: |
|
|
Okay.
But... those permissions are as created by portage, I restored the permissions as they were after my experimentation / debugging. This obviously means that portage is creating directories with permissions which prevent it using them itself. Something's not right...
cvs-src,egit-src,git-src and hg-src directories all have permissions as default, at least on my system. _________________ "Trust me, I know what I'm doing!"
- Sledge Hammer |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Oct 12, 2015 6:37 pm Post subject: |
|
|
l33tmmx wrote: | But... those drw-rw-r-- permissions are as created by portage, I restored the permissions as they were after my experimentation / debugging. [...] cvs-src,egit-src,git-src and hg-src directories all have drw-rw-r-- permissions as default, at least on my system. |
l33tmmx ... that's not the case here:
Code: | # ls -l /usr/src/distfiles/*(/)
/usr/src/distfiles/egit-src:
total 16
drwxr-xr-x 6 portage portage 4096 2015-10-07 18:24 ffmpeg.git/
drwxr-xr-x 6 portage portage 4096 2014-03-16 12:19 lorcon/
drwxr-xr-x 6 portage portage 4096 2014-09-29 13:37 mdev-like-a-boss.git/
drwxr-xr-x 6 portage portage 4096 2014-11-19 10:33 zsh-completion.git/
/usr/src/distfiles/git3-src:
total 12
drwxr-xr-x 6 portage portage 4096 2015-09-22 16:15 lorcon.git/
drwxr-xr-x 6 portage portage 4096 2015-10-07 18:40 mpv-player_mpv.git/
drwxr-xr-x 6 portage portage 4096 2014-07-28 10:20 zsh-users_zsh-completions.git/
/usr/src/distfiles/svn-src:
total 8
drwxrwxr-x 3 portage portage 4096 2014-01-26 17:40 aircrack-ng/
drwxrwxr-x 3 portage portage 4096 2014-03-19 01:13 zapwireless/ |
... perhaps a feature you have enabled?
Code: | # emerge --info | grep '^FEATURES'
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms strict suidctl unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" |
best ... khay |
|
Back to top |
|
|
|