GNU bug report logs - #53752
guix home cannot configure authorized_keys

Previous Next

Package: guix;

Reported by: Zacchaeus Scheffer <zaccysc <at> gmail.com>

Date: Thu, 3 Feb 2022 18:09:02 UTC

Severity: normal

Full log


Message #28 received at 53752 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Zacchaeus Scheffer <zaccysc <at> gmail.com>, Liliana Marie Prikler
 <liliana.prikler <at> ist.tugraz.at>
Cc: 53752 <at> debbugs.gnu.org
Subject: Re: bug#53752: guix home symlink permissions
Date: Mon, 07 Feb 2022 22:02:26 +0100
[Message part 1 (text/plain, inline)]
Zacchaeus Scheffer schreef op ma 07-02-2022 om 14:47 [-0500]:
> I was able create the desired effect with the following service
> definition:
> (simple-service
>  'my-activation-service
>  home-activation-service-type
>  (gexp
>   (begin
>     (chdir (ungexp user-home))
>     (if (not (file-exists? ".ssh"))
>         (mkdir ".ssh"))
>     (chmod ".ssh" #o700)
>     (chdir ".ssh")
>     (let ((port (open-output-file "authorized_keys")))
>       (display (ungexp authorized-keys) port)
>       (close-port port))
>     (chmod "authorized_keys" #o600)
>     (chdir ".."))))
> where 'user-home and 'authorized-keys are appropriate strings defined
> earlier in the file.
> 
> I believe that resolves the issue,

Users shouldn't have to do this (relatively) huge block of relatively
inscrutable code though, I believe something along these lines (or a
different solution) needs to be implemented in Guix itself somewhere
before the issue is resolved.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.