1

I’ve been reading a few posts about this, but still haven’t gotten any traction. I’m convinced I’m dealing with my options getting overridden.

Context

I have an exfat mounted drive on a Raspberry Pi 4. I have two users, root and dietpi.

I want to mount the exfat drive so that the user dietpi can read and write to all the files in the drive.

I’ve sudo apt install exfat-fuse, and I have a line in my /etc/fstab:

/dev/sda1 /home/dietpi/filerun/user-files/ auto fmask=0777,user,noauto 0 0

I understand that this lets me run mount /dev/sda as a non root user (as dietpi) which is great.

But then the permissions when I ls -l that directory are as follows:

drwxr-xr-x  9 root   root  131072 Mar 19 04:07 user-files

The file are there, root can read/write to them. But not dietpi - it can only read, as the permissions show. Note that before I mount, this is what ls -l shows:

drwsrwxrwx  9 dietpi   dietpi  4096 Mar 19 04:07 user-files

I understand that with exfat drives, it defaults to root when you mount a directory as exfat drives have no notion of permissions. I cannot chown user-files to dietpi, either after it’s mounted.

If I print mount, what’s interesting is that it shows fmask=0222,user=dietpi. So the user is not root, which is good, but the fmask is not what I expected it to be. Is it getting overridden?

$ mount
…
/dev/sdal on /home/dietpi/filerun/user-files type exfat (rw, nosuid, nodev, noexec, relatime, fmask=0022, dmask=0022, jocharset=utf 8, errors=remount-ro, user=dietpi)
1
  • 1
    This question doesn't seem to belong here - not specific to Raspberry Pi, should go to Linux community
    – Vadim
    Mar 19 at 19:09

1 Answer 1

0

The following worked, but ONLY after a restart (sigh..):

UUID=XXXX-XXXX /path/to/mnt/dir exfat users,exec,rw,suid,dev,atime,diratime,uid=1000,gid=1000,umask=000 0 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.