You are not logged in.

#1 2022-10-29 16:46:29

gieddy
Member
Registered: 2022-10-29
Posts: 6

[SOLVED] how to allow non sudo users to mount a specific drive

Hello I've been stuck on this for ages now. I really don't know what to do.
I have a specific partition on my drive (/dev/sda3) that I would like to mount without sodo-ing.

I added this line to fstab:
UUID=********                               /mnt/Data  exfat           users,rw,relatime,noauto        0 2
(UUID has the actual UUID of the actual drive, but I don't know if posting it online is safe)

This doesn't allow me to mount the drive as I get the following error:
$ mount /dev/sda3
FUSE exfat 1.3.0
ERROR: failed to open '/dev/sda3': Permission denied.

However it lets me umount the drive.
Next I red that there might be a problem with polkit, so I installed udisks2 and I created the file file /etc/polkit-1/rules.d/10-udisks2.rules as reported here, copying and pasting the content in order to check if that would make any difference.
It doesn't: mount /dev/sda3 still fails with the same error, and udisksctl mount -b /dev/sda3 still asks for the password (even though i'm in the wheel group).

Any input would be appreciated as I can't find anything else to do.

(PS: sorry for bad english, I'm not a native speaker)

Last edited by gieddy (2022-10-29 17:35:07)

Offline

#2 2022-10-29 17:18:46

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: [SOLVED] how to allow non sudo users to mount a specific drive

You do not necessarily want an fstab line at all for removable media you're mounting with udisksctl. Note that udisksctl will want to use a different mount point (/run/media/<something>/) rather than /mnt/Data. See the man page for details.

EDIT: users and user are both valid options in fstab, which do slightly different things. See man mount for details.

Last edited by cfr (2022-10-29 17:35:51)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2022-10-29 17:21:33

jocheem67
Member
Registered: 2009-11-09
Posts: 250

Re: [SOLVED] how to allow non sudo users to mount a specific drive

Hi, you probably need something like exfat-utils or exfat-progs. Not sure which one but on my KDE box I'm typing this from, I've got exfat-utils installed and I can mount exfat as a regular user.

Offline

#4 2022-10-29 17:32:24

gieddy
Member
Registered: 2022-10-29
Posts: 6

Re: [SOLVED] how to allow non sudo users to mount a specific drive

jocheem67 wrote:

Hi, you probably need something like exfat-utils or exfat-progs. Not sure which one but on my KDE box I'm typing this from, I've got exfat-utils installed and I can mount exfat as a regular user.

I installed exfatprogs which replaced exfat-utils which I already had and now it works! Thank you so much!

Offline

Board footer

Powered by FluxBB