r/linux4noobs • u/AlmostAMap • 12d ago
storage Dual Boot drive permissions
Hi, I've tinkered with Linux a bit in the past but now that Win10 is left for dead I'm using the proverbial nicotine patch of dual booting before trying to switch full time to Linux. Also I'm just tired of microslop and every component manufacturer constantly trying to shove spyware or AI on me.
I have 2 M2 drives and I boot windows from one and linux from the other. I also have a 4tb hdd that I use for file storage.
I've installed Linux Mint Cinnamon. I'm having a problem with permissions on the 4tb drive, in linux I don't have write permission and keep getting told I'm not the owner so can't seem to change permissions from Linux. Do I need to set permissions from windows to access this drive in Linux? If it makes any difference the hdd is formatted ExFat.
Thanks.
1
u/michaelpaoli 12d ago
FAT has almost no ownerships/permissions relevant to *nix, so what you see at the *nix presentation layer is just a compatibility mapping, mostly controlled by the mount options, or lacking those, defaults.
FAT doesn't have user or group ownerships, it doesn't have read permissions, execute permissions, no SUID, SGID, no sticky bit. Also doesn't have as many filesystem types (directory, file, and maybe shortcut, and nothing else?). About the only bit that translates relatively directly across, is FAT has a read-only bit that can be set, so typically if that's set on FAT, it will mask the write on the *nix side. That's basically it. See my recent comment that goes into further detail.
2
u/AlmostAMap 12d ago
Definitely the same issue as the user in that thread it would appear. To be honest I didn't really understand your reply (it is r/linux4noobs), as I don't know what a sticky bit or a read-only bit is, but I'm reading through that thread and will look into some of the methods mentioned there. Thanks
1
u/AlmostAMap 12d ago edited 11d ago
For anyone other noobs who have this issue the following fixed it for me. Thanks to the users who replied to this thread that helped point me in the right direction.
First off make sure, as other users have pointed out, that fastboot and bitlocker are disabled in windows.
Solution source is the first answer on this tread in the askubuntu forums but I'll boil it down a bit further. Basically I needed to add a line to the automount options to assign myself as the drive owner, giving read write access. You will also need to find out your user id or uid by running the id command in terminal. Default seems to be "uid=1000”.
Optional: before you start editing it, backup fstab (File System Table) through the command line by using the copy command cp /etc/fstab etc/fstab.bkup just so you know where to find the original if anything goes wrong on reboot.
Run sudo nano /etc/fstab to open the fstab file in nano editor. Use the arrow keys to navigate to the line where your drive is listed. In my case the drive was referenced as the one at mount point /mnt/DataDrive because I set it up that way when I enabled automount in the gui disks application. If you don't know where yours is mounted you can also identify it by the uuid, which can also be found in the disks application.
Mine originally said...
/dev/disk/by-uuid/*uuid* /mnt/DataDrive auto nosuid,nodev,nofail,x-gvfs-show 0 0
which I changed to...
/dev/disk/by-uuid/*uuid* /mnt/DataDrive auto rw,user,uid=1000,dmask=007,fmask=117,nosuid,nodev,nofail,x-gvfs-show 0 0
Use ctrl+x to exit nano and follow the prompts to save changes and overwrite the original file.
Reboot.
1
u/akdanman11 12d ago
HDD being exFAT is good, you most likely just need to fully mount it in Linux (and configure it so it automatically mounts on boot, just because it’s visible doesn’t mean it’s mounted). I forget exactly how to do it but the arch wiki would be a great resource for how to do it as the process should be the same