From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gJZhHqYc/GEZ1wAAgWs5BA (envelope-from ) for ; Thu, 03 Feb 2022 19:19:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EDjtGqYc/GHVLQEAauVa8A (envelope-from ) for ; Thu, 03 Feb 2022 19:19:18 +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 2269435EAC for ; Thu, 3 Feb 2022 19:19:18 +0100 (CET) Received: from localhost ([::1]:48100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFghR-000145-3Q for larch@yhetil.org; Thu, 03 Feb 2022 13:19:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFgXZ-0005AD-PW for bug-guix@gnu.org; Thu, 03 Feb 2022 13:09:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35548) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nFgXW-0001Vk-In for bug-guix@gnu.org; Thu, 03 Feb 2022 13:09:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nFgXW-0007jX-9Z for bug-guix@gnu.org; Thu, 03 Feb 2022 13:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#53752: guix home symlink permissions Resent-From: Zacchaeus Scheffer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 03 Feb 2022 18:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53752 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 53752@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164391172229699 (code B ref -1); Thu, 03 Feb 2022 18:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Feb 2022 18:08:42 +0000 Received: from localhost ([127.0.0.1]:57678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFgXB-0007iw-4U for submit@debbugs.gnu.org; Thu, 03 Feb 2022 13:08:42 -0500 Received: from lists.gnu.org ([209.51.188.17]:60326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFgX6-0007im-Kv for submit@debbugs.gnu.org; Thu, 03 Feb 2022 13:08:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFgX5-0004t8-SW for bug-guix@gnu.org; Thu, 03 Feb 2022 13:08:36 -0500 Received: from [2a00:1450:4864:20::62c] (port=44659 helo=mail-ej1-x62c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nFgX3-00012T-P4 for bug-guix@gnu.org; Thu, 03 Feb 2022 13:08:35 -0500 Received: by mail-ej1-x62c.google.com with SMTP id ka4so11206533ejc.11 for ; Thu, 03 Feb 2022 10:08:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=Y8Sx0vhnmYcJwhrWXgxyUXxLWJQ0QWaPvEUd5TggkPM=; b=EQo1pifQsrrXwL5aRzVT/JdZxEl9eHpi0aBpBvDGv3hRKZdksrlSYz7fg0+zCCup2f GO7bdps9KVX38tBy66E9RebsQjh1zC2/xxPH+PPAjeCHrroRmCuqZB+wHxM6gJTH9Lu7 TU6h20uE1BFPv2yg6JER9qlZaqzjyPZHkX3Fof3S0FLeC7Q7kzPOktahMj+BtB3QbTk6 ma2JTH0NV8YF1k7XLamodSzGcTZivT1UJKjaTzlXusHBD81JIr7WEDaEmrpnbnuUeG/9 Q6TCh506Q9VRHBZ5rdP5BdG6ILjcc3pUW6a++1Tp3yNbvf+mtJW2IU4QUSyuArulbCbD mc1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Y8Sx0vhnmYcJwhrWXgxyUXxLWJQ0QWaPvEUd5TggkPM=; b=iLc0FjW6/4X9iz/xL6P7RmEo4SWx2s0xu/UISkga3lerj/C3vWUYMiy9n1CTsn8/ma Pm80XDbqZvzcrGpjIXJJy58/kzMFKN/uVbMgtDY1x28NW9NEejk0VvttngToojTghPRU 0lbBLMjtvbn1mYQGnU68dQY9HH/nRvCugHaxiHyh4uj30uR1WffNcb3JU3p5hFyMDjsT qmsAWVQtudjPjHehpmH2rLcHxVYewC1lwKAGprK9yFOriNjz2MmnblL/Q9CpPC72aGi4 J3kdIzgAYRxmKhUPesOY2cAprEol/P+ClTF+UxjX8oh1atFN2zAuP3+cHQKvAKGldGWb blzw== X-Gm-Message-State: AOAM530kWx3YOWlFpUvyxeQ3e1toA8FxKA3Hrcu0o8ADgdBhDLkZ5vVz hg2s9OdHtsGyR9treOmyA8j/3ATt/Lk9BRcdYyBoq7mpK18YqQ== X-Google-Smtp-Source: ABdhPJzkEHEFjUz3HfInnxBXJf8VoBJU6H1Pt60HrsT5+hWXfxzQCsV3ilZCI0CTMWBWSZ7cUTwNlDbANKf4iHFgY4U= X-Received: by 2002:a17:907:3da4:: with SMTP id he36mr30112812ejc.617.1643911703250; Thu, 03 Feb 2022 10:08:23 -0800 (PST) MIME-Version: 1.0 From: Zacchaeus Scheffer Date: Thu, 3 Feb 2022 13:08:12 -0500 Message-ID: Content-Type: multipart/alternative; boundary="0000000000001d4bcb05d72105d6" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::62c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=zaccysc@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.1 / 5.0 requ) BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1643912358; 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:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=Y8Sx0vhnmYcJwhrWXgxyUXxLWJQ0QWaPvEUd5TggkPM=; b=THwDy7stvJmO3/+eVJ1w6SFSIYmjAHaOnxK6purLBT2d8DDNoAs0w+1wxE+QJrAmzTjsPc RqhkaL98CjLQUfcdkBuvz+R1fp8I4D1wtu6WvkhAfkXY6NJdl5rZLp23jEr8XM8jyZLtj+ N0Z7Ux3xV0U0sswFKIH4V9bKOYF6eNgZV+LA5Y+Baw9+CYYQ/34Rm74prguYkAzGVY1wx+ TZNvLkwVWLfsdlde87210ZK2Xql6J6V1/Spd2YuGSxIjLLrM3YKrY/6Rt52KUkv4gcB1HV QtyXIdfzl+qo8wIcyiqyX9XonMlufojc3/XqCuUQeMuPneTmMBk6ea50Xp/UZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643912358; a=rsa-sha256; cv=none; b=fBgQzJo/SrVAfYFIGSPZWHLGShEfuF7izqFbcwiZYAW2JGWmUX86j7DdsPlr9mahfBoe5Y Jf0nVO1BzCbJTsZTxck8+UT4gfOYDExrWVgf0x38EAx645GRfYloZKqZ4Q8zIkBqX3GkxE ac2cqeujQJtkiHSdw736G7qqOBipjUUk2fdbTBtrYT8Ix5h80/A5vAkhc3Z226HdmHCifp 1Z/x/XdYTNsCFiVSSWfpOH0zN0SVTTHUBVCrWjiyb9zHv2V1iECxJ5gNUihowgOI29G3Tk +1Ld97apu88zHYGYppSbxaZfKrHhfEINtF2Dqj00gY9xbzp9mFAEXuQv29z6WA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=EQo1pifQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.23 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=EQo1pifQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2269435EAC X-Spam-Score: -2.23 X-Migadu-Scanner: scn1.migadu.com X-TUID: KnU7jtXKDeHh --0000000000001d4bcb05d72105d6 Content-Type: text/plain; charset="UTF-8" I finally migrated my home configuration to guix home. However, it seems guix home creates all symlinks with 777 permissions. This causes problems with openssh as it will not recognize my ~/.ssh/authorized_keys. It seems the directories have reasonable permissions (maybe because they already existed?), but it seems like someone could in theory edit the symlinks in-place (though I wasn't able to figure that out). I formulated based on the example in Section 11.1 of the devel user manual. You should be able to recreate the problem with (replacing ): (home-environment (services (list (simple-service 'my-home-files-service home-files-service-type (list `("ssh/authorized_keys" ,(plain-file "home-authorized-keys" ""))))))) --0000000000001d4bcb05d72105d6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I finally migrated my home configuration to guix home.=C2= =A0 However, it seems guix home creates all symlinks with 777 permissions.= =C2=A0 This causes problems with openssh as it will not recognize my ~/.ssh= /authorized_keys.=C2=A0 It seems the directories have reasonable permission= s (maybe because they already existed?), but it seems like someone could in= theory edit the symlinks in-place (though I wasn't able to figure that= out).

I formulated based on the example in Section= 11.1 of the devel user manual.=C2=A0 You should be able to recreate the pr= oblem with (replacing <your ssh public key here>):

=
(home-environment
=C2=A0 (services
=C2=A0 =C2=A0 (= list
=C2=A0 =C2=A0 =C2=A0 (simple-service
=C2=A0 =C2=A0 =C2= =A0 =C2=A0'my-home-files-service
=C2=A0 =C2=A0 =C2=A0 =C2=A0home-fil= es-service-type
=C2=A0 =C2=A0 =C2=A0 =C2=A0(list
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0`("ssh/authorized_keys"
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 ,(plain-file
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0"home-authorized-keys"
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"<your ssh public key here= >")))))))
--0000000000001d4bcb05d72105d6--