From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6KzOFPJLh187RwAA0tVLHw (envelope-from ) for ; Wed, 14 Oct 2020 19:05:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id yDiZEPJLh19TWQAAbx9fmQ (envelope-from ) for ; Wed, 14 Oct 2020 19:05:22 +0000 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 22596940712 for ; Wed, 14 Oct 2020 19:05:21 +0000 (UTC) Received: from localhost ([::1]:59138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSm5P-0000Sj-8r for larch@yhetil.org; Wed, 14 Oct 2020 15:05:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSm5G-0000SX-QM for help-guix@gnu.org; Wed, 14 Oct 2020 15:05:11 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:37733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSm5E-0007s5-NG for help-guix@gnu.org; Wed, 14 Oct 2020 15:05:10 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A434C5C0245 for ; Wed, 14 Oct 2020 15:05:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 14 Oct 2020 15:05:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantherx.org; h= date:from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=fm1; bh=rkkbKxgmp3EzEfz2ud5YglXQmh 8EMXXZBocBcNsQGxc=; b=G45dpokapA6Kx4Pir+tMGl6ARiokbQRnJAu8IlXqMz 2uvYYwbZNkBnovPuFmdm/n/Nz+5p99rMCUX0ShBjtBdvQO0e0YKsPNysO4CpfsBN W3eJ1UMJ5hOxk6fqUnWZaibyN3gsJRHglsqgGYdypmwOyadVLgkddDncpN6quPHB ut0TG6YIcn2YeSOvpZ77G9a7jInAXY48opaD6gm7Wx3nIlWYYQqouI0vKyfHLzV6 4aQ9b/QEr5lUKZWy5snXzbVJ+kR3bJ+IHo8hHltE7KlSyrZdVQvMhfCFaoANHDPm 1q+vasjf3XeHnR3Awk1KU65sf/oZ4GQxHynT4mF1kd9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=rkkbKx gmp3EzEfz2ud5YglXQmh8EMXXZBocBcNsQGxc=; b=XPcz7OST8DGhhH+UnCRMCq fKsn3GeUC7rwO2Ib8KR2u2F4WxIeSxMT6UaxZpjrMOZ5YzDtpLC9bfnfJ83+Ouhk xpA1tlO7UdeXQ2z9p7THeJoYZPY/WHS+3B0ZlbQXT5s6kL2CjhqJCnSK6Y8bVzxT VlBBqCchPCEAs/KxoBFcrC0OWbaA6LKi2vzGV/lWCsChYYWTyCpEuoX5HV8nMgrJ pZipl1uxlXQPUUMMFHJGDJVd+J53mtc6rUNHbgSu6r++PBBbSj9ORXTWtPX1TVDu dnfmQRVAwQH26vVB8EQVbJG0R+c8oRRkDJHThDkVplVWQQYWQIPWbCcsPgWP1aug == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedriedugddufeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkohfogggtgfesthejre dtredtvdenucfhrhhomheptfgviigrucetlhhiiigruggvhhcuofgrjhguuceorhdrmhgr jhgusehprghnthhhvghrgidrohhrgheqnecuggftrfgrthhtvghrnhepffdufeejvdfgje ehtdekjefgjeejgeehtdduveegvedvtdeiledtieeivedtieetnecuffhomhgrihhnpehp rghnthhhvghrgidrohhrghenucfkphepudekhedrvddtledrudeliedrudehkeenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrrdhmrghjuges phgrnhhthhgvrhigrdhorhhg X-ME-Proxy: Received: from localhost (unknown [185.209.196.158]) by mail.messagingengine.com (Postfix) with ESMTPA id 8143B3064674 for ; Wed, 14 Oct 2020 15:05:05 -0400 (EDT) Date: Wed, 14 Oct 2020 22:34:59 +0330 From: Reza Alizadeh Majd To: help-guix@gnu.org Subject: writable skeleton files in sub-directories Message-ID: <20201014223459.3b7829cd@pantherx.org> Organization: PantherX X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=66.111.4.28; envelope-from=r.majd@pantherx.org; helo=out4-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/14 15:05:06 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 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" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pantherx.org header.s=fm1 header.b=G45dpoka; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=XPcz7OST; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: viG3/r6sGB5F Hi Guix, working on a new service for `lxqt-desktop`, I need to provide a series of predefined configurations for that. so I defined a series of skeleton files and add them to the service using `account-service-type` extension. the problem is that when the location of a skeleton file is a path other than user's home directory, it will be created in read-only mode. I also tried to use `computed-file` and `chmod` the created file. but the permission still didn't apply. I also provided a test configuration to reproduce this issue: --8<---------------cut here---------------start------------->8--- (use-modules (gnu) (guix records)) ;; ;; Test service definition ;; (define-record-type* test-config make-test-config test-config?) (define (test-skeletons) `((".config/test" ,(computed-file "test-config-dir" (with-imported-modules '((guix build utils)) #~(begin (use-modules (guix build utils)) (mkdir-p #$output))))) (".config/test/foo.conf" ,(plain-file "foo.conf" "this is readonly")) (".config/test/bar.conf" ,(computed-file "bar.conf" (with-imported-modules '((guix build utils)) #~(begin (use-modules (guix build utils)) (call-with-output-file #$output (lambda (port) (display "this is also readonly" port))) (chmod #$output #o644))))) ("baz.txt" ,(plain-file "baz.txt" "this is writable")))) (define test-service-type (service-type (name 'test-service) (extensions (list (service-extension account-service-type (const (test-skeletons))))) (default-value (test-config)) (description "test service for skeleton files issue"))) ;; ;; Operating system definition ;; (operating-system (host-name "guix.local") (timezone "Asia/Tehran") (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/sda"))) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") (type "ext4")) %base-file-systems)) (services (cons* (service test-service-type) %base-services))) --8<---------------cut here---------------end--------------->8--- running the above configuration, `~/baz.txt` is writable, but `foo.conf` and `bar.conf` files which are located in `~/.config/test/` are both read-only: --8<---------------cut here---------------start------------->8--- root@guix ~# ll ... -rw-r--r-- 1 root root 29 Oct 14 21:18 baz.txt ... root@guix ~# ll .config/test/ ... -r--r--r-- 1 root root 20 Oct 14 21:18 foo.conf -r--r--r-- 1 root root 40 Oct 14 21:18 bar.conf ... --8<---------------cut here---------------end--------------->8--- is there anything that I might be missed in definition of skeleton files? or it might be a bug in creation of skeleton files. Regards, Reza -- Reza Alizadeh Majd PantherX Team https://www.pantherx.org/