On 1/5/19 4:35 pm, Mick wrote: > On Wednesday, 1 May 2019 03:32:21 BST Bill Kenworthy wrote: >> Got sidetracked - turns out fuse and exfat on usb do not play well with >> mounts as a user due to changes late last year. It can now only be >> mounted/unmounted by root. >> >> The second part (also due to fuse) is that to stop fuse (silently as ls >> still showed the execute bit set) from interfering with execution of >> files on the mounted device) it must be mounted as the user under a user >> owned directory such as /home/user (mount cannot deal with this - it did >> in the past, but something has changed). So the solution is to mount >> via root as the user you want (via sudo) under a mount point in the >> users home. This may all be unique to fuse-exfat, and which versions of >> everything involved as I saw one email on the mechanics of the changes >> saying fat is handled a little differently due to a different use >> scenario. And ext2/3/4 etc don't have the problem at all. Auto-mount >> on device plugin still doesn't happen so thats next on my list. >> >> /etc/fstab: >> >> /dev/sda1 /home/myuser/mnt auto >> rw,auto,exec,uid=1000,gid=1000,users,user=myuser 0 0 >> >> >> BillK > exFAT and VFAT are mounted with different permissions by udisks, without > overriding options in fstab or command line. > > A random file in exFAT: > > $ stat /run/media/michael/VERBATIM32G/blah > File: /run/media/michael/VERBATIM32G/blah > Size: 32768 Blocks: 64 IO Block: 4096 regular file > Device: 811h/2065d Inode: 19 Links: 1 > Access: (0777/-rwxrwxrwx) Uid: ( 1000/ michael) Gid: ( 1002/ michael) > Access: 2018-06-08 11:20:50.000000000 +0100 > Modify: 2015-08-24 12:50:56.000000000 +0100 > Change: 2015-08-24 12:50:56.000000000 +0100 > Birth: - > > A random file in FAT: > > $ stat /run/media/michael/CRUCIAL-8G/blah > File: /run/media/michael/CRUCIAL-8G/blah > Size: 1731366 Blocks: 3384 IO Block: 4096 regular file > Device: 810h/2064d Inode: 124 Links: 1 > Access: (0644/-rw-r--r--) Uid: ( 1000/ michael) Gid: ( 1002/ michael) > Access: 2019-04-08 01:00:00.000000000 +0100 > Modify: 2007-08-25 22:46:42.000000000 +0100 > Change: 2019-04-08 14:04:54.000000000 +0100 > Birth: - > > Ditto for directories. > > exFAT: > > $ stat /run/media/michael/VERBATIM32G/Foo > File: /run/media/michael/VERBATIM32G/Foo > Size: 32768 Blocks: 64 IO Block: 4096 directory > Device: 811h/2065d Inode: 24 Links: 1 > Access: (0777/drwxrwxrwx) Uid: ( 1000/ michael) Gid: ( 1002/ michael) > Access: 2018-02-11 17:22:52.000000000 +0000 > Modify: 2018-02-11 17:22:54.000000000 +0000 > Change: 2018-02-11 17:22:54.000000000 +0000 > Birth: - > > > FAT: > > $ stat /run/media/michael/CRUCIAL-8G/Foo > File: /run/media/michael/CRUCIAL-8G/Foo > Size: 4096 Blocks: 8 IO Block: 4096 directory > Device: 810h/2064d Inode: 79 Links: 2 > Access: (0755/drwxr-xr-x) Uid: ( 1000/ michael) Gid: ( 1002/ michael) > Access: 2019-04-08 01:00:00.000000000 +0100 > Modify: 2019-04-08 14:43:26.000000000 +0100 > Change: 2019-04-08 14:43:26.000000000 +0100 > Birth: - > > The mount options are different as shown below. > > exFAT: > > $ findmnt -oOPTIONS /dev/sdb1 > OPTIONS > rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other, > blksize=4096 > > FAT: > > $ findmnt -oOPTIONS /dev/sdb > OPTIONS > rw,nosuid,nodev,relatime,uid=1000,gid=1002,fmask=0022,dmask=0022,codepage=437, > iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro > > > In the above examples I used udisksctl to mount the devices. I understand > Gnome expose via Gvfs an API to handle I/O to block devices, which desktop > applications can plug into without performing raw kernel calls to hardware > devices (like e.g. /bin/mount does). I don't run Gnome and am not familiar > with its internals to know how similar it is with udisksctl. > > Regarding mounting with udisksctl I don't know why exFAT and VFAT are > different, but the udisksctl man page provides this revealing information on > the mount permissions allowed: > > The device will be mounted with a safe set of default options. You > can influence the options passed to the mount(8) command with > --options. Note that only safe options are allowed - requests with > inherently unsafe options such as suid or dev that would allow the > caller to gain additional privileges, are rejected. > > HTH.
Sounds like you are using gnome/systemd ... thats a whole other box of worms to open. This is a gnomeless openrc system with a recently getting elogind to replace consolekit. BillK

