From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YDPMLIxofWD6CAEAgWs5BA (envelope-from ) for ; Mon, 19 Apr 2021 13:25:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SJWHJ4xofWCRRAAAB5/wlQ (envelope-from ) for ; Mon, 19 Apr 2021 11:25:00 +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 3E46B25733 for ; Mon, 19 Apr 2021 13:25:00 +0200 (CEST) Received: from localhost ([::1]:35498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYS1T-0000TC-DY for larch@yhetil.org; Mon, 19 Apr 2021 07:24:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYDQh-0007QK-Te for help-guix@gnu.org; Sun, 18 Apr 2021 15:50:04 -0400 Received: from smtprelay08.ispgateway.de ([134.119.228.98]:10007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYDQg-0007b0-4k for help-guix@gnu.org; Sun, 18 Apr 2021 15:50:03 -0400 Received: from [93.195.170.159] (helo=milk) by smtprelay08.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lYDPs-00050B-1g for help-guix@gnu.org; Sun, 18 Apr 2021 21:49:12 +0200 From: Simon Streit To: help-guix@gnu.org Subject: Re: mount.davfs: program is not setuid root In-Reply-To: (Leo Famulari's message of "Fri, 16 Apr 2021 12:34:53 -0400") Date: Sun, 18 Apr 2021 15:36:12 +0200 References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) X-From-Line: nobody Sun Apr 18 21:45:03 2021 X-From-Line: nobody Sun Apr 18 15:36:13 2021 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: bGlzdHNAbmV0cGFuaWMub3Jn Received-SPF: none client-ip=134.119.228.98; envelope-from=lists@netpanic.org; helo=smtprelay08.ispgateway.de X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 19 Apr 2021 07:24:21 -0400 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-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618831500; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=14/AODj9htpN3VcbU0ZDZvWUJkdjM14oVFZ0b/TMeHw=; b=WrjNqdzhbw+5hT5hKws9u3U+mBtQCWEwDFDgtuKqVLl9Ly6vI9eBrbA8vPfW0BEXMKYH0J vpnlkVuvmoVm9f1nNKTy6yTzoJPqgjz1jB2wyssa45OMx9HUKC3BMxO38CuZY14FwEn5O5 sd8EeqcY/JyntPsFSZ1OehOYF33UAbYTFZjA/l41y27OOw7Ai8OsMgT0OQqhQXZm9Xda+n ZkZYnTk8M7s9RF0av16gclp63WTZbw5l8gx3Al0By1QyLF4yYwKPYnVBxzS/vxR/W/goXQ 6SmfNdWLWPTdXvmWk1k0+5sD3E2fX70UfehvgaHmTL5dqwLd34U3QH8VMiLOvg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618831500; a=rsa-sha256; cv=none; b=ikcmbJKTrRpP4z/gQ7to2z7QBDYySVAOlKtN58Z4pPh0Ku3CcSB7rUlzDVG3Rl89sdI9zQ lr+SBmbFe2L21WpsFDLUijTB/J4fHBmhp1S4YEOw9h+Al0uHH1t9DEt3NYHusU8/EicVAK v640Q0oVkcVACutDVef/1zI9OW4oTmIzG9xS1m3dSMugk21FEeXeP7+pwjRqAQV+FdwPr2 L4qd5GRSVKPmlq0p/HA86vEs2ntygRFwY8mLNgP5NB1w9J/80/kG1JH6TZRvSHB7I2MlTN 0LerxDd2yxGF8hwST9mQz0StDgPWo9laWgTSk7u/TLSHT6X8ePCurVWBMIVx2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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-Migadu-Spam-Score: -2.44 Authentication-Results: aspmx1.migadu.com; dkim=none; 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-Migadu-Queue-Id: 3E46B25733 X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: Tvbg1uKMUty3 Leo Famulari writes: > On Fri, Apr 16, 2021 at 03:31:35PM +0200, Simon Streit wrote: >> But after rebooting, and trying to mount a webdav share as user, I only >> get: >> >> --8<---------------cut here---------------start------------->8--- >> /run/current-system/profile/sbin/mount.davfs: program is not setuid root >> --8<---------------cut here---------------end--------------->8--- >> >> mount.davfs is listed in /run/setuid-programms though. > > On Guix System, /run/setuid-programs [0] always comes before > /run/current-system on PATH. > > But in your case, the non-setuid location is being invoked. Somehow it is. I invoked it with: --8<---------------cut here---------------start------------->8--- $ mount -t davfs URL moint_point --8<---------------cut here---------------end--------------->8--- Looking at the whereabouts of mount: --8<---------------cut here---------------start------------->8--- mount: /run/setuid-programs/mount.davfs /run/setuid-programs/mount /run/setuid-programs/mount.ntfs-3g /run/setuid-programs/mount.nfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/bin/mount /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.davfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.lowntfs-3g /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.ntfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.ntfs-3g --8<---------------cut here---------------end--------------->8--- and mount.davfs: --8<---------------cut here---------------start------------->8--- mount: /run/setuid-programs/mount.davfs /run/setuid-programs/mount /run/setuid-programs/mount.ntfs-3g /run/setuid-programs/mount.nfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/bin/mount /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.davfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.lowntfs-3g /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.ntfs /gnu/store/b01q3awvrfzaj8n8hx73qqfyf59przh8-profile/sbin/mount.ntfs-3g --8<---------------cut here---------------end--------------->8--- It does seem that the binaries are setuid first. But then looking at my own $PATH I see the setuid paths are not first in the list. So do they have to go to the front of the list? I just tested this on a clean user account where setuid are set first, but it fails there too. I also temporarily added the mount point to /etc/fstab. Mounting this mount point as root works. It fails as user too. There is a possibility that I did not get mount flags right there, but that will be a different issue. The next will be to add this do system declaration as well. But first when user can mount it. > > Did you invoke `mount.davfs`, so it would be looked up on PATH? Even when calling the binary from /run/setuid-programs will fail as well. > > Or did you invoke `/run/current-system/profile/sbin/mount.davfs`? > > [0] https://guix.gnu.org/manual/en/html_node/Setuid-Programs.html