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 yBnpB3gOzV+2NwAA0tVLHw (envelope-from ) for ; Sun, 06 Dec 2020 17:01:44 +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 ULqrA3gOzV9+QAAAbx9fmQ (envelope-from ) for ; Sun, 06 Dec 2020 17:01:44 +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 BADF4940363 for ; Sun, 6 Dec 2020 17:01:43 +0000 (UTC) Received: from localhost ([::1]:54444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klxPo-0006pM-Qa for larch@yhetil.org; Sun, 06 Dec 2020 12:01:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klxO8-0006p8-VN; Sun, 06 Dec 2020 11:59:56 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:38285) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klxO7-0002pP-7p; Sun, 06 Dec 2020 11:59:56 -0500 Received: by mail-wr1-x42e.google.com with SMTP id p8so10426535wrx.5; Sun, 06 Dec 2020 08:59:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=+FiUJrUejF4hhc57kE4kK+MSsNvxbANVnMBg2o46wD4=; b=X9J+rcBwtJbl8ZpYYeT0C80rG0DSmLmkiyqYxga655QBZjIUQBAPV00n+YypuTv5kq JVi1IwLIpBGXDHX2BA3i5rIOIP5btx7ZAPGEZyhytf4iAgU2QMi5y8LWTFlezK8eBMVh VcioKjNoVQMwxSWdiNutow3b6ou+DWwhq43dTI1AkJvBbuaff+LI9XRiVogVv42upTrz yvSHNTn2MBXdgZ3Ha9SwYMl7wzK4KtIlsTEb9v8WXphezZqJIC/YA3B6QG89bhOaVIws KEb+qNiqgRCqBnbLmWraGDJ5kbbm3XqbyTvxWX38dv1BdmHX3WsUqN24ZfRNNyaiicks RwMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=+FiUJrUejF4hhc57kE4kK+MSsNvxbANVnMBg2o46wD4=; b=RTeTz/VnqmvqUBCStlL/lzMU36W8FFbXV+eH2J+8K44tUl6M70i3CwP9T218KKbFGr nFRc9SwY8rO+5blQSUboWSh7ym00GoXNL5E+wdBg82M74zRfOH3q62UO5PV6FiqlMc1+ B4te0E6JyDEUjn02sYL5kDO42IxyBR2Dxkf6KQIpRXlNt2xplmBxM97oRAIAmPI0F5ce TFwTXC2KTsVj3YfXUQlMjyizahOnHCypP2JBWqI2dq5sCoa0mFtrlOrw7wjewiXRSVkJ wvvqwg6JvEm9RaaffeN8ecd1VNiHeT/E9Dak8/TY4XopRKIlA/hiZhK/TUTKvc+cDZWH 4DBw== X-Gm-Message-State: AOAM532TjRyZRUuCvJ3cYfLNIIQbFmYJ3gpbQ2U3Ht1KdR99ut4Cujii +mGuKcqBvTaxxjv0eNdJmd5mYx+MRZQ= X-Google-Smtp-Source: ABdhPJwtKwH7DXKdDlbqlWpgEi67e5GdtkD9kGaagEgqkJeryNfgVTXPcfTGeraieFkhAfozhTXDnA== X-Received: by 2002:adf:ef4c:: with SMTP id c12mr15963787wrp.242.1607273993052; Sun, 06 Dec 2020 08:59:53 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id o203sm11394898wmb.0.2020.12.06.08.59.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2020 08:59:52 -0800 (PST) From: zimoun To: yasu , bug-guix@gnu.org, pgarlick@tourbillion-technology.com, Pjotr Prins Subject: Re: BUG: Re: guix environment: error: cannot create container: unprivileged user cannot create user namespaces In-Reply-To: References: <20201204185537.qhapfbyaq7cr5lkr@thebird.nl> <4556420c9440a6c34df93213e3934176e214483f.camel@yasuaki.com> Date: Sun, 06 Dec 2020 17:56:56 +0100 Message-ID: <86eek2an53.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=X9J+rcBw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: BADF4940363 X-Spam-Score: -3.00 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: Gye63BLAliyE Hi, Please try the recommendation. Have you tried it? please set /proc/sys/kernel/unprivileged_userns_clone to "1" As root, you just do: echo 1 > /proc/sys/kernel/unprivileged_userns_clone then =E2=80=9Cguix environment -C=E2=80=9D should work as expected. To do = the trick automatically with Sheperd, I do not know, but I am sure that the systemd equivalent=20 echo "kernel.unprivileged_userns_clone =3D 1" > /etc/sysctl.d/local.conf sysctl --system seems doable with Guix System. On my system, and I need explanations if it does not work similarly on yours, I simply do: --8<---------------cut here---------------start------------->8--- $ guix environment -C --ad-hoc hello -- hello=20 guix environment: error: cannot create container: unprivileged user cannot = create user namespaces guix environment: error: please set /proc/sys/kernel/unprivileged_userns_cl= one to "1" $ su - Password: # echo 1 > /proc/sys/kernel/unprivileged_userns_clone=20 # logout $ guix environment -C --ad-hoc hello -- hello=20 Hello, world! --8<---------------cut here---------------end--------------->8--- Hope that helps, simon