You are not logged in.

#1 2018-08-07 18:21:12

doubleslash
Member
Registered: 2011-08-16
Posts: 80

[SOLVED]Permission denied mounting vfat

Hello,
I have a memory card that I want to mount manually on /mnt/sd and to have read and write permissions once mounted. My /etc/fstab is as follows

 UUID=3461-6339	/mnt/sd	exfat	noauto,rw,user,suid,uid=1000,gid=1000	0 0

Why do I get "Failed to open /dev/...Permission denied" when I mount it?
I don't know if this is relevant. The directory /mnt/sd has permissions 775, root ownership, and storage group ownership. I am in the storage group.
Thanks for the help

Last edited by doubleslash (2018-08-08 16:35:50)

Offline

#2 2018-08-07 19:07:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,842

Re: [SOLVED]Permission denied mounting vfat

Exact mount command and error message, please?
(It would seem to fail accessing the block device, so you should also paste "stat /dev/<whatever>")

Offline

#3 2018-08-07 19:47:03

doubleslash
Member
Registered: 2011-08-16
Posts: 80

Re: [SOLVED]Permission denied mounting vfat

Exact mount command and error message, please?

I run

mount /mnt/sd

and get the error

FUSE exfat 1.2.8
ERROR:failed to open '/dev/mmcblk1p1': Permission denied

It would seem to fail accessing the block device, so you should also paste "stat /dev/<whatever>"

The output of stat /dev/mmcblk1p1 is

  File: /dev/mmcblk1p1
  Size: 0         	Blocks: 0          IO Block: 4096   block special file
Device: 6h/6d	Inode: 12406       Links: 1     Device type: b3,19
Access: (0660/brw-rw----)  Uid: (    0/    root)   Gid: (  994/    disk)
Access: 2018-08-07 11:44:32.377546723 -0700
Modify: 2018-08-07 11:43:24.514210839 -0700
Change: 2018-08-07 11:43:24.514210839 -0700
 Birth: -

Offline

#4 2018-08-07 20:15:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,842

Re: [SOLVED]Permission denied mounting vfat

Everything fine here, but mount.exfat isn't SUID and apparently not leveraged by mount either.

sudo chmod u+s /usr/bin/mount.exfat-fuse

But this will
a) be overridden w/ the next exfat-utils update
b) maybe allow you to "mount.exfat /dev/foo /mnt/bar" as user and w/o any fstab entry.

Offline

#5 2018-08-07 21:04:57

doubleslash
Member
Registered: 2011-08-16
Posts: 80

Re: [SOLVED]Permission denied mounting vfat

I did 2 things and the problem is solved:
1. I found the user and group ownerships of the device ( by running ls -l /dev/mmcblk1) to be root and disk. After adding myself to the disk group, the permission error went away. However, I received error messages from fuser.
2. Then, I ran the command you suggested

sudo chmod u+s /usr/bin/mount.exfat-fuse

and the problem went away. I can mount as non-root and have read and write permissions.

But this will be overridden w/ the next exfat-utils update

What can I do so I won't ever have to mess around with this in the future? I spent literally several hours on this. Wouldn't want to go through the same ordeal again.

Offline

#6 2018-08-08 05:37:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,842

Re: [SOLVED]Permission denied mounting vfat

Add a pacman hook, file a bug to the package.
But be weary about the other caveat (you may allow random mounts to everyone).

Also, in case you file a bug, please be exact: it's especially not a "vfat" mount.

Offline

Board footer

Powered by FluxBB