4

I am trying to mount an exfat drive using fstab with read/write permission for both user and group. The line of etc/fstab for this drive is:

UUID=5E98-37EA /home/ftagliacarne/data/media exfat defaults,rw,uid=1000,gid=1001,umask=002 0 1

Using these option the drive gets mounted to the correct location to the correct user and group, however, the group does not have read-write access. i.e. the permission are set to:

drwxr-xr-x 7 ftagliacarne docker-media 262144 Sep 24 20:40 media

Is there any way of setting the group permission to also have read-write access?

Desired outcome:

drwxrwxr-x 7 ftagliacarne docker-media 262144 Sep 24 20:40 media

Some of the things I tried:

  • Setting umask to 002
  • Using chmod before/after mounting
  • Using chmod recursively on the parent directory

Appreciate any help you can give me.

Update 1:

I also tried changing the fstab file to the following:

UUID=5E98-37EA /home/ftagliacarne/data/media exfat defaults,uid=1000,gid=1001,dmask=0002,fmask=0113 0 1

Alas, it still does not work.

Update 2:

After having issues at boot due to the configurations above, I changed the /etc/fstab entry to the following:

UUID=5E98-37EA /home/ftagliacarne/data/media exfat defaults,uid=1000,gid=1001,fmask=0113,dmask=0002,nofail 0 0

And now it works. I suspect the issue was with the pass option being 1, as changing that to 0 seems to have fixed it. Thank you to everyone who helped!

Ftagliacarne
  • 143
  • 1
  • 7

1 Answers1

4

chmod and chown will not work for mounted fat32, exfat and ntfs-3g, period.

What you're looking for is dmask=0002,fmask=0113.

Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64
  • Thanks for the answer, unfortunately, that also didn't work. – Ftagliacarne Oct 09 '22 at 19:37
  • 1
    That absolutely should have worked. Please post the output of `ls -la /home/ftagliacarne/data` It works here on three different mount points. – Artem S. Tashkinov Oct 12 '22 at 18:42
  • For me this worked: `rw,nofail,x-systemd.automount,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro`. Make sure to set the appropriate user/group IDs (instead of 1000). – goetz Feb 21 '23 at 23:44