unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Timo Wilken <guix@twilken.net>
To: help-guix@gnu.org
Subject: How do I install a file with custom permissions?
Date: Tue, 29 Nov 2022 20:24:13 +0100	[thread overview]
Message-ID: <20221129192413.q75rkyevtrtslyix@timo-pc> (raw)

Hi Guixers,

I'm trying to patch the `wireguard-service-type' to accept pre-shared
keys and add them to the generated config. This all seems to work
fine, except that I can't get guix to generate a non-world-readable
configuration file.

I've tried adding a `(chmod port #o400)' call to the end of the lambda
that generates the config file (gnu/services/vpn.scm lines 784-838),
but that seems to have no effect -- the resulting file at
/gnu/store/...-wireguard-config/wg0.conf is still
world-readable. Adding `(chmod #$config-file #o400)' after the
`call-with-output-file' call doesn't work either.

What do I need to do to make guix install the generated config file
with 0400 permissions?

Cheers,
Timo


             reply	other threads:[~2022-11-29 19:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 19:24 Timo Wilken [this message]
2022-11-29 19:34 ` How do I install a file with custom permissions? Julien Lepiller
2022-11-29 19:43   ` Timo Wilken
2022-11-29 19:34 ` Tobias Geerinckx-Rice
2022-11-29 20:56   ` Timo Wilken

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20221129192413.q75rkyevtrtslyix@timo-pc \
    --to=guix@twilken.net \
    --cc=help-guix@gnu.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).