all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: rekado <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: permission denied: /gnu/store/...guile...
Date: Fri, 22 May 2015 15:33:10 +0200	[thread overview]
Message-ID: <87vbfkka95.fsf@gnu.org> (raw)
In-Reply-To: <14d7ac1498c.12ad9f4e8144025.5836079713405423473@elephly.net> (rekado@elephly.net's message of "Fri, 22 May 2015 16:33:17 +0800")

rekado <rekado@elephly.net> skribis:

> ---- On Fri, 22 May 2015 05:53:51 +0800 Ludovic Courtès<ludo@gnu.org> wrote ---- 
>  > Could you try this: 
>  >  
>  > --8<---------------cut here---------------start------------->8--- 
>  > (chdir "/tmp") 
>  > (setgroups #()) 
>  > (setgid 30000) 
>  > (setuid 30001) 
>  > (pk 'uid/gid (getuid) (getgid)) 
>  > (pk 'euid/egid (geteuid) (getegid)) 
>  > (let loop ((i 3)) 
>  >   (when (< i 1024) 
>  >     (false-if-exception (close-fdes i)) 
>  >     (loop (+ 1 i)))) 
>  > (execl "/gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile" "guile" 
>  >        "-c" "(pk 'running (getuid) (geteuid))") 
>  > --8<---------------cut here---------------end--------------->8--- 
>  >  
>  > and then as root run: 
>  >  
>  >   # guile the-above-file.scm 
>  >  
>  > It should return zero and print: 
>  >  
>  > --8<---------------cut here---------------start------------->8--- 
>  > ;;; (uid/gid 30001 30000) 
>  >  
>  > ;;; (euid/egid 30001 30000) 
>  >  
>  > ;;; (running 30001 30001) 
>  > --8<---------------cut here---------------end--------------->8--- 
>
> I ran it in a guile REPL (as root) and I got the first two outputs, but an error on (execl ...).  It's an unhelpful message:
>
>     ERROR: In procedure execl:
>     ERROR: In procedure execl: Permission denied

Great, that means that we have a reduced test case now!

Now, could you try to comment out some of the lines before the ‘execl’
until you find which one is responsible for that?

IIRC you said that
"/gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile" is
555, so normally every user on the machine can run it.  It can only
imagine an obscure kernel or file system setting that would somehow
prevent execution, but we’ll see.

Thank you,
Ludo’.

  reply	other threads:[~2015-05-22 13:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 20:06 permission denied: /gnu/store/...guile rekado
2015-05-21 21:53 ` Ludovic Courtès
2015-05-22  8:33   ` rekado
2015-05-22 13:33     ` Ludovic Courtès [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-05-20  7:06 rekado
2015-05-20  8:17 ` Andreas Enge
2015-05-20 11:24 ` Daniel Pimentel
2015-05-20 12:24   ` Ludovic Courtès
2015-05-20 13:12     ` Daniel Pimentel
2015-05-20 17:24       ` Alex Kost
2015-05-20 12:18 ` Ludovic Courtès
2015-05-20 20:56   ` rekado
2015-05-21  8:03     ` Ludovic Courtès
2015-05-22 20:15 ` Mark H Weaver
2015-05-22 20:21   ` Mark H Weaver
2015-05-23 14:22   ` Ludovic Courtès
2015-05-23 16:26     ` Mark H Weaver
2015-05-23 22:28       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbfkka95.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.