I have been trying to setup two linux users to be allowed to delete files on a drive that has been formatted to exFat for now.
I have:
- a main pc running on Windows - it's also a backup pc
- a mediacenter running on Ubuntu 22.04
- an external hard drive which is usually connected to the mediacenter - it's currently formated in exFat
I regularly disconnect the hard drive from the mediacenter to connect it to the main pc and backup the files to the main pc. (In case it matters I use a simple robocopy command line on the windows pc to sync the external HDD (exFat) contents to the Windows backup disks (NTFS))
On the mediacenter pc I:
- have set up one session that starts a graphical kodi session automatically at boot - Let's call the user "kodi1"
- use another session to, let's say, download ubuntu images. Anything I download is stored on the external hard drive - Let's call the user "user2"
I want to allow both linux users to delete files on the hard drive. As of now, fstab is configured to mount the disk as "user2" because from the docs I read and from the tests I made it seems to be the right thing to do.
Problem is that in this configuration, kodi1 can't delete files from the external drive (user2 can write on the drive, and kodi1 can read the data only).
I attempted to create a linux user group called "diskusers", and added kod1 and user2 to the group then tried to set the gid in fstab as the owner for this disk (user2/diskusers). "kod1" was never allowed to delete files, but if I'd set it as the mount owner in fstab.
I then attempted to change the owner of some folders of the external hdd to "kodi1:kodi1" or "user2:diskusers", or to chmod it to 777, but i either get error messages telling me it's not doable or it doesn't output any error but it does nothing.
I read that all of the above would be expected because it's exFat.
I could probably have formatted the external hdd in ext4, but I don't really know how good is the support for ext4 disk on windows nowadays (even though I know it's supposed to have improved), and if it's really better now. Should I do so, run ubuntu from the Microsoft Store + rsync on the windows pc to sync the data locally instead? (is this even possible?!). Is the Microsoft ubuntu app even required? Or shall the Windows sub-system manage this directly with robocopy?
From what I read, NTFS allows linux permissions to be set from the linux host. I'm not sure of the consequences: if I set linux permissions on the ntfs external hdd while it's connected to the linux mediacenter then connect the hdd to the windows host could it cause issues with the disk on Windows?" Is this even a good idea?
Notes:
- that i've never been good at setting permissions on neither Windows nor linux besides this specific issue...
- the easiest may be to:
- format the external disk to ext4 + the backup disk to ext4 as well
- dual boot to linux on the windows main pc
but i'd rather avoid doing this, and instead learn from this current issue (especially about permissions)
Tried my best to make it clear but...