From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: bug#22962: Something keeps overwriting /etc/hosts Date: Wed, 9 Mar 2016 20:43:23 -0500 Message-ID: <20160310014323.GA29687@jasmine> References: <20160309214232.027164e0@scratchpost.org> <20160310002811.0b59a57f@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adpe2-0007kD-Ib for bug-guix@gnu.org; Wed, 09 Mar 2016 20:44:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adpdy-0007hc-Ho for bug-guix@gnu.org; Wed, 09 Mar 2016 20:44:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:44972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adpdy-0007hX-9P for bug-guix@gnu.org; Wed, 09 Mar 2016 20:44:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1adpdx-00033i-W0 for bug-guix@gnu.org; Wed, 09 Mar 2016 20:44:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <20160310002811.0b59a57f@scratchpost.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Danny Milosavljevic Cc: 22962@debbugs.gnu.org On Thu, Mar 10, 2016 at 12:28:11AM +0100, Danny Milosavljevic wrote: > If I make it immutable, I get the following message on guix system reconfigure ... : > > guix system: error: copy-file: Permission denied: "/etc/hosts" > > Aha! I think that on GuixSD, the hosts file is generated from the system configuration, specifically the 'hosts-file' field, which is mentioned in section 7.2.2 Operating System Reference [0]. I assume that the resulting file is recreated each time you reconfigure. In that case, you'd want to leave the file /etc/hosts alone, and make your changes in the operating system configuration. I say "I think" and "I assume" because I haven't actually used 'hosts-file' yet, nor have I looked at that part of the code. Does that help? [0] https://www.gnu.org/software/guix/manual/guix.html#operating_002dsystem-Reference