Sample Header Ad - 728x90

How to allow users to mount FUSE/exfat filesystems in fstab without root?

0 votes
0 answers
884 views
I have a filesystem listed in /etc/fstab and I'd like a normal user to be able to mount it. Normally I would just add the users option and it will work, however it seems that if the filesystem is mounted by a FUSE helper, this doesn't work: /dev/disk/by-label/SDCARD /mnt/sdcard exfat x-gvfs-hide,users,noatime,fmask=0133,dmask=0022,codepage=437,iocharset=iso8859-1,uid=1000,gid=985,noauto Should a normal user try to mount this: $ mount /mnt/sdcard/ FUSE exfat 1.4.0 (libfuse3) ERROR: failed to open '/dev/sda1': Permission denied. It seems that although the users option allows the mount command to run, it still only runs as a normal user and not as root. I don't particularly want to give the normal user direct access to the device, and sudo will already solve the problem but I am trying to make this work without it. The SD card is used in a device that requires exfat, so reformatting to FAT32 won't work. Is there any way that will allow this to proceed as it does when using a non-FUSE filesystem, specifically that the device file has the same restrictions but a normal user can mount and unmount the device without root or sudo access?
Asked by Malvineous (7395 rep)
Sep 17, 2023, 11:42 AM
Last activity: Mar 18, 2025, 01:26 PM