Ubuntu auto mount exfat drive allow_other non root users access

Issue

  • I have an exfat formatted drive.
  • I'm able to unmount and mount it on an ubuntu 20.04 desktop.
  • I can read files from it, however, I can only write files as root/sudo user. I've tried a lot of different settings with no success. Saw some comments about allow_other flag using fuseblk which I couldn't get fuseblk working.

I was able to use the ubuntu graphical disks application to mount and unmount. But still had issues with non root write permission.

Some other commands:

  • mkdir /home/drive1 mount point
  • sudo umount -f -l /home/drive1 force umount drive
  • code /etc/fstab using visual studio code to open fstab and modify mount permissions
  • sudo mount -a mount all drives in /etc/fstab, used to verify that mount settings aren't broken
  • chown won't work for nfs and fat drives
  • chmod 777 also won't work although there are some comments on +x executable working

test user access

  • cd /home/drive1
  • mkdir test fails
  • sudo mkdir test works
  • touch file.txt fails
  • sudo touch file.txt works

mount attempts:

  • sudo mount /dev/sdb2 /home/drive1 -o rw,uid=yourusername,gid=yourusername, sudo still required to write files
    • id yourusername
  • sudo mount -t vfat /dev/sdb2 /home/drive1 -o rw,umask=0000 runs but root still required
  • sudo mount -t exfat /dev/sdb2 /home/drive1 -o uid=1000,gid=1000 same issue
  • sudo mount -t exfat /dev/sdb2 /home/drive1 -o rw,allow_other,umask=0000 fails to mount with allow_other

purpose

  • trying to use external auto mounted exfat formatted drive as a volume for a docker container, read working, but write failing (even in docker container privileged mode)
2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

lastlink is a new contributor. Be nice, and check out our Code of Conduct.

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like