From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AEPeKYNdhmPVpgAAbAwnHQ (envelope-from ) for ; Tue, 29 Nov 2022 20:29:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aHW3KYNdhmOkAwAA9RJhRA (envelope-from ) for ; Tue, 29 Nov 2022 20:29:07 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7122D8C76 for ; Tue, 29 Nov 2022 20:29:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p06Hd-0003VI-2a; Tue, 29 Nov 2022 14:28:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p06DP-0002Mg-31 for help-guix@gnu.org; Tue, 29 Nov 2022 14:24:23 -0500 Received: from mx1.mythic-beasts.com ([2a00:1098:0:86:1000:0:2:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p06DN-0002gI-Fi for help-guix@gnu.org; Tue, 29 Nov 2022 14:24:22 -0500 Received: from [2a01:e0a:acc:b9b0:13f:c961:cb0d:71c3] (port=44010 helo=timo-pc) by mailhub-cam-d.mythic-beasts.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1p06DL-00DSMj-BO for help-guix@gnu.org; Tue, 29 Nov 2022 19:24:19 +0000 Date: Tue, 29 Nov 2022 20:24:13 +0100 From: Timo Wilken To: help-guix@gnu.org Subject: How do I install a file with custom permissions? Message-ID: <20221129192413.q75rkyevtrtslyix@timo-pc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-BlackCat-Spam-Score: 14 Received-SPF: pass client-ip=2a00:1098:0:86:1000:0:2:1; envelope-from=guix@twilken.net; helo=mx1.mythic-beasts.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 29 Nov 2022 14:28:44 -0500 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669750147; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=TRzC4XrL0osqphD3+Rtjoq8l5eMsaQamSwP96fBlvnI=; b=OyMuWKBL2WqtYIl9IVLDZMfRz/uVnhOfNEL008WgR1tzd9AFvfzmZzjnyva8FHPLWosdkU mhsWtJKLL8Rz5fLeNmbMsdUkxCmdU5UFm/jFPP3eCZZRSjnwTwaKVdCRelI8FZRtn6dfEp ptfrHXOk7py6PuSjKSSrucugmv/H9uqtmxxwGOZLvAP/JCYbn6kj5Up1hcw9PtEgSX6tjv dPK9ULEkMe1NvAmRuTiLJneL94XLjZQeot2GGF30ATAG3Vg+dGFHLoeDDQdZ0IIaO8LH9p dIcvr9F4TO6rNEJTlOXKcXvsXju+hwDdNa1qTMVRTEX2xeHljTM2PkbO5jjrNA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669750147; a=rsa-sha256; cv=none; b=KW+AmXXamjnuac+j1GD923zZu5WApvQfChgGgYJ9nGgPaY78yIF+Y60F4xBfwa4kgcSuHO btAJmk9uQ31AWG/abiXNT/17yuaky/MS/ASWrMs0YiuHpxHyoJB5BCENTGrrpjsmMxH1V6 znqm4I0adBpKq5lEGuAZeGXKXNOa/mqIMd+bL+YEepAD88ilNjTNnHyCAqAoo9c3y43D95 I3nnsTov67ICNItspDE97BzsfSlqjyPoPvBpACoL8dRFkorrvQbllYtpLsXg4FEpYT33Ee gncWkMdSeL5o0WR3HJa4JEYiNtd21awbM3D6w5m1idx8QosoVJj4T54RHUEcVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.06 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7122D8C76 X-Spam-Score: -2.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: t+ZX4ipHQ2fv 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