From: Simon Streit <simon@netpanic.org>
To: help-guix@gnu.org
Subject: Re: mount.davfs: program is not setuid root
Date: Sun, 18 Apr 2021 15:36:12 +0200 [thread overview]
Message-ID: <ygulf9fl6m9.fsf@netpanic.org> (raw)
In-Reply-To: <YHm8rWGby+qZYn/n@jasmine.lan> (Leo Famulari's message of "Fri, 16 Apr 2021 12:34:53 -0400")
Leo Famulari <leo@famulari.name> 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
next prev parent reply other threads:[~2021-04-18 21:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 13:31 mount.davfs: program is not setuid root Simon Streit
2021-04-16 16:34 ` Leo Famulari
2021-04-18 13:36 ` Simon Streit [this message]
2021-04-18 23:01 ` Leo Famulari
2021-04-19 10:50 ` Simon Streit
2021-04-19 17:18 ` Leo Famulari
2021-04-21 21:46 ` Simon Streit
2021-04-19 20:30 ` Simon Streit
2021-04-20 0:47 ` Leo Famulari
2021-04-20 6:57 ` Efraim Flashner
2021-04-20 7:20 ` Efraim Flashner
2021-04-21 21:43 ` Simon Streit
2021-05-11 17:42 ` Simon Streit
2021-05-11 18:41 ` Leo Famulari
2021-05-11 19:30 ` Simon Streit
2021-05-11 19:34 ` Leo Famulari
2021-05-11 20:59 ` Simon Streit
2021-05-13 13:25 ` Simon Streit
2021-04-18 13:36 ` Simon Streit
2021-04-18 20:07 ` Simon Streit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ygulf9fl6m9.fsf@netpanic.org \
--to=simon@netpanic.org \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).