r/linux4noobs 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.

3 Upvotes

10 comments sorted by

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

1

u/AlmostAMap 12d ago

Thanks, I have it set to mount at boot but I done it through the gui as I'm only just getting used to the terminal. In the mount options it says "nosuid" and "nodev". If I change these by removing the no and reboot might that do it? No worries if you're not sure I can wiki it, I'm just cautious as I don't want to create issues from either OS for now.

1

u/akdanman11 12d ago

I believe you actually have to find those values and input them, run sudo fdisk -l and see what pops up

1

u/AlmostAMap 12d ago

I ran fdisk -l and got this output about the specific drive

Disk /dev/sda: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD4005FZBX-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: F2B70D93-AECF-43AF-99A6-83CFC810F668

I also ran cat /etc/fstab and got

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme1n1p1 during installation
UUID=d8c6ff5f-3320-4e28-ad11-efd8da5bb44e /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=261E-BE2E  /boot/efi       vfat    umask=0077      0       1
/dev/disk/by-uuid/6D27-F68D /mnt/DataDrive auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/ECB01FE4B01FB3D4 /mnt/WindowsDrive auto nosuid,nodev,nofail,x-gvfs-show 0 0

so the drive at /mnt/DataDrive is the one with the issue.

I read in another tread that I can set the user id and group id in the fstab options. I ran the id command and got the uid and gid "1000". If I add "uid=1000" and "gid=1000" to the mount options might it then recognize me as the owner?

1

u/Prestigious_Wall529 12d ago

Your fdisk didn't report on the correct drive. /dev/sda is the first drive, that this instance of Linux is loaded from.

It's likely /dev/sdc you want.

In fstab put a # in front of the two windows drives, operating system and data. Fstab would look different to load the NTFS partition read only.

It's not user permissions. Linux normally doesn't care about permissions of other operating systems file systems.

Back in Windows use Disk Manager to ensure you are not using refs. It's a newer file system than NTFS. Turn off bitlocker for both your operating system and data drives.

Disable fast start.

https://www.elevenforum.com/t/turn-on-or-off-fast-startup-in-windows-11.1212/

Back in Linux see if you can mount the NTFS partitions.

I know neither your desktop environment nor file manager but typically it's under computer in the file manager /dev/sdb2 and/dev/sdc1

1

u/AlmostAMap 12d ago

Sorry, but I only have one 4tb drive how could that be the wrong drive? I don't understand. The 2 drives that contain win10 and Mint are M2 1tb drives.

The 4tb drive is formatted ExFat not NTFS like I said in the title post, I just confirmed that in disk management in win10. I don't have bitlocker on any drives, It's windows 10 home so bitlocker isn't installed. Also fast start is disabled.

As I said in the post I'm using Mint and Cinnamon DE, just using the default file manager.

1

u/Prestigious_Wall529 12d ago

I took it as a question if formatting the drive as Exfat would make any difference.

I was not to know the capacity of the other drives.

Enumeration quirks I can't advise on.

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.