For people (dual-booting with Windows) struggling with file permissions after following this guide, try setting the Options field to include your uid and gid. An example .mount file with this would look like:
[Unit]
Description=Mount MEDIA disk (/data/MEDIA)
[Mount]
What=/dev/disk/by-label/MEDIA
Where=/data/MEDIA
Type=exfat
Options=uid=1000,gid=1001
#TimeoutSec=seconds
[Install]
WantedBy=multi-user.target
And it’s not strictly necessary, even then, unless maybe defaulting to the ntfs3 kernel module. The former fuse-based ntfs-3g drivers tended to be overly forgiving from too many perspectives.
Your suggestion is a classic xy problem because you have not set the correct permissions for the mount point - so you try with uid and gid - then you think that is a solution which it is not.
Adding uid and gid to options in the tutorial is confusing - what about the - potential - other users on the system?
exFAT is born permissionless, and in the world of Linux NTFS is a permissionless filesystem.
However the mount point e.g. /data/media, is not permissionless as those are located in the Linux file system.
This means - that you need to allow rw access for the mount point and you need to do it before mounting.
Does this need to be run once before starting the mount unit or should it run every time before the unit runs at boot? I would rephrase this as, does the Linux mount point persist with its permissions on reboot?
Regarding the confusion with including uid and gid in the tutorial, would this command be a better option, and would every user need to run this command before mounting? If so, would this command fit in the guide better than my uninformed “solution”? And if so, I request you to add just a tiny blurb about permissions issues to your article.
In my opinion a guide is supposed to be comprehensive, and the nature of computing knowledge is such that a guide can never be complete. I hope I am not stepping on anyone’s toes by sharing what worked for me, even though it might not have been the “right” thing to do.