[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53752: guix home symlink permissions
From: |
Maxime Devos |
Subject: |
bug#53752: guix home symlink permissions |
Date: |
Mon, 07 Feb 2022 22:02:26 +0100 |
User-agent: |
Evolution 3.38.3-1 |
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
Description: This is a digitally signed message part