help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mount.davfs: program is not setuid root


From: Simon Streit
Subject: Re: mount.davfs: program is not setuid root
Date: Sun, 18 Apr 2021 15:36:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]