From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: permission denied: /gnu/store/...guile...
Date: Sat, 23 May 2015 16:22:28 +0200 [thread overview]
Message-ID: <87mw0ve5ln.fsf@gnu.org> (raw)
In-Reply-To: <87617knzbm.fsf@netris.org> (Mark H. Weaver's message of "Fri, 22 May 2015 16:15:41 -0400")
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
Mark H Weaver <mhw@netris.org> skribis:
> The problem turned out to be that on rekado's system, / was owned by
> user "rekado" with mode 700.
Oh, I see. I would never have thought of this!
> Perhaps 'guix system init' should explicitly set the ownership and
> permissions on the target root directory?
Here’s a tentative patch.
I wonder if the activation code shouldn’t systematically do
(chown "/" 0 0) as well.
Thoughts?
Thank you both for investigating!
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 804 bytes --]
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 8d5fbe5..2cf6a43 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -145,6 +145,14 @@ When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG."
;; Copy items to the new store.
(copy-closure to-copy target #:log-port log-port)))))
+ ;; Make sure TARGET is root-owned when running as root, but still allow
+ ;; non-root uses (useful for testing.)
+ (if (zero? (getuid))
+ (chown target 0 0)
+ (warning (_ "not running as 'root', so \
+the ownership of '~a' may be incorrect!~%")
+ target))
+
(let ((os-dir (derivation->output-path os-drv))
(format (lift format %store-monad))
(populate (lift2 populate-root-file-system %store-monad)))
next prev parent reply other threads:[~2015-05-23 14:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 7:06 permission denied: /gnu/store/...guile 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-21 20:40 ` Synaptics & libinput driver Ludovic Courtès
2015-05-20 12:18 ` permission denied: /gnu/store/...guile 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 9:41 ` rekado
2015-05-23 14:22 ` Ludovic Courtès [this message]
2015-05-23 16:26 ` Mark H Weaver
2015-05-23 22:28 ` Ludovic Courtès
-- strict thread matches above, loose matches on Subject: below --
2015-05-21 20:06 rekado
2015-05-21 21:53 ` Ludovic Courtès
2015-05-22 8:33 ` rekado
2015-05-22 13:33 ` 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=87mw0ve5ln.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=mhw@netris.org \
/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.