From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aJmbA8evfWF6WQAAgWs5BA (envelope-from ) for ; Sat, 30 Oct 2021 22:49:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id xgjHOsavfWHFXAAAbx9fmQ (envelope-from ) for ; Sat, 30 Oct 2021 20:49:10 +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 C4DD820559 for ; Sat, 30 Oct 2021 22:49:10 +0200 (CEST) Received: from localhost ([::1]:41278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgvHp-0004ie-Gg for larch@yhetil.org; Sat, 30 Oct 2021 16:49:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgvHi-0004iU-Ls for bug-guix@gnu.org; Sat, 30 Oct 2021 16:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46977) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgvHi-00061c-Ce for bug-guix@gnu.org; Sat, 30 Oct 2021 16:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgvHi-0001os-Bq for bug-guix@gnu.org; Sat, 30 Oct 2021 16:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#51442: Non-default umask when using guix system leads to wrong file permissions Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 30 Oct 2021 20:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51442 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 51442@debbugs.gnu.org Received: via spool by 51442-submit@debbugs.gnu.org id=B51442.16356269056941 (code B ref 51442); Sat, 30 Oct 2021 20:49:02 +0000 Received: (at 51442) by debbugs.gnu.org; 30 Oct 2021 20:48:25 +0000 Received: from localhost ([127.0.0.1]:58523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgvH6-0001nt-QG for submit@debbugs.gnu.org; Sat, 30 Oct 2021 16:48:25 -0400 Received: from jpoiret.xyz ([206.189.101.64]:50834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgvH4-0001nj-J5 for 51442@debbugs.gnu.org; Sat, 30 Oct 2021 16:48:23 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 5A0AD184BFA; Sat, 30 Oct 2021 20:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1635626899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HhlgQD6mazMrV0Ad64HNjNelAh3Au7mz4Ve1RfB09+s=; b=Q0b+kbVYTv6gahbLLj1KjXALgoN0XdCthvyFzHsYW+k7TKRWS87AyEyT4n8lKT2P6PsaXw S3vxKk/SxVyZt3KGZkR2LESz4BD5yvZAfj39ORd1MWqUPb9+x3aE0/tPnEyFCtlDeaRE3z IJ2uoqV8aXNhrHQo1stNY5DTPgCdM5ZInw428ZfS+LoTMKNMAL6gQf98rRv6CJEwZ11KIx ooFU/3HeL8YE4Tk0jwJqipP8BKIrhMBtyDa+e/Tpray2kVwv0v0i47f7z8WGDXLJFL88Kc 8mL8v4iL/9KZP/mNSHS8Cq2ZkPfEo+f8b9HBfsFNRk+B9INdX9kwLkybenb8ew== In-Reply-To: <87k0hvy7cz.fsf@gnu.org> References: <87wnlya3tn.fsf@jpoiret.xyz> <87k0hvy7cz.fsf@gnu.org> Date: Sat, 30 Oct 2021 20:48:18 +0000 Message-ID: <87zgqqz1bh.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / 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" Reply-to: Josselin Poiret From: Josselin Poiret via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635626950; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=HhlgQD6mazMrV0Ad64HNjNelAh3Au7mz4Ve1RfB09+s=; b=bXElSKISqZK7mET/s7mnzMuawrSGcN3wXKZsc5ES3g3KZ1y5rPN9fs/0tP5qhpZ2dyFkYv gG2+1C/yA9RTX1Wbam0t2/TFq76J5WWl+okgBvxUpDH4lxBk9nIRNrsln/vsbkJ3Hbp+Lv PoH0xrwu7aYybgqoJXTrwPXHZ8QyuXX9QcSQZz/Xu4qoeP7bE9lRnWbxn4i4m0AS2MQP1R l6Z/a2h2wjbXDGwGD/j/ezy/aWgpQMvqG4jVkw72NoxR5rPPA41BxzKL35hM8pkLAmCZ7I JvoSTmlWzpKgosQbqXzzNDChXD0w0TTvKMCHsGD9shdW2inBYISkuj8HYnS2DA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635626950; a=rsa-sha256; cv=none; b=KZ0f69if7c1dxSS2YaCMZdgRs1n/NzQQQsgRhLb0NnIBSGwNL8bDFrEmLUV8q3sHqgOqkn OqiHvtrZSNgtsfXae3V1YJfg+QBhZ2tR4E4EZXmxpXvNWkCPMiQT0ODIUOv8ASU4TY4aXe +wbrrUZeYs8EI6q5ZLWkbNpycVfWOenk3eli+p7nW9lMTwAat0QGwBR9WPzQ+GbE7JCCEj nqmxozSM+UTadb+uUmprTURc00malSTB3QF5jNJCeWG35wfTBNfMkKlon6wssac/Ytde9e LIgMewAe0lG189Sx+miwl/AaKLdeDh9/vwKBeFdkEJRzC1ahAJ1NNOclIbc/Jg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=Q0b+kbVY; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=Q0b+kbVY; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: C4DD820559 X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: upvKtUSny1rH Hi, Ludovic Court=C3=A8s writes: > Perhaps the best fix would be to set the umask explicitly before > activation snippets run, like so (untested): > [snip] > WDYT? I forgot about those too! I guess they're run in two different contexts: once when `guix reconfigure` happens, and another one in the boot script. This would work here, but not be nearly enough: in init, you also have the populate-root-file-system procedure which will create many directories without set permissions, and if they are created with a-r, it will also cause havok (I think the first issue wonko reported was about the directories not being readable). I still think that the whole init/reconfigure commands should have their umask set to #o022 as a sane default, even for future changes to them: whatever they're touching is supposed to be "the system" itself and not user files, so inherited user-set umasks shouldn't matter. It just feels like we're trying to fight back against 'sudo' preserving things when it shouldn't but alas. Best, Josselin Poiret