You are not logged in.
I installed Arch and Windows on dual boot successfully and I want my 1TB hard disk to be a common partition for both OSs so I can share files and put common stuff there. I read that the best option was exFAT, so I decided to format it like that. the partition is /dev/sda2:
sblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 8G 0 part [SWAP]
└─sda2 8:2 0 923.5G 0 part /home/leo/Files
nvme0n1 259:0 0 119.2G 0 disk
├─nvme0n1p1 259:1 0 550M 0 part /boot
├─nvme0n1p2 259:2 0 16M 0 part
├─nvme0n1p3 259:3 0 41.7G 0 part
├─nvme0n1p4 259:4 0 535M 0 part
└─nvme0n1p5 259:5 0 76.5G 0 part /
It is already added to my partition table:
# /dev/nvme0n1p5
UUID=027a8657-6b66-464c-bb6e-9f0ab0d9ffc8 / ext4 rw,relatime 0 1
# /dev/nvme0n1p1 LABEL=SYSTEM
UUID=1AFB-9C0B /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda2
UUID=7E7B-E954 /home/leo/Files exfat rw,relatime,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro 0 2
# /dev/sda1
UUID=2fbe5ddb-23dd-4f70-9be5-c96b9f4d769d none swap defaults 0 0
It is also already recognized and mounted by Windows.
The problem is that, in Windows, I can create, delete and edit files freely; but, in Linux, I need sudo permission to do it. I tried changing the ownership of the entire mount point, but I get this error:
sudo chown -R leo:leo ~/Files/
[sudo] password for leo:
chown: changing ownership of '/home/leo/Files/pagefile.sys': Operation not permitted
chown: changing ownership of '/home/leo/Files/DumpStack.log.tmp': Operation not permitted
chown: changing ownership of '/home/leo/Files/$RECYCLE.BIN/desktop.ini': Operation not permitted
chown: changing ownership of '/home/leo/Files/$RECYCLE.BIN/$IRSYD7R': Operation not permitted
chown: changing ownership of '/home/leo/Files/$RECYCLE.BIN/$RRSYD7R': Operation not permitted
chown: changing ownership of '/home/leo/Files/$RECYCLE.BIN/$I0QLOZY': Operation not permitted
...
Last edited by LeonN (2024-04-24 23:10:38)
Offline
The last command is not changing permissions of the mount point (the directory “/home/leo/Files”), but contents of the mounted filesystem. And this is why it fails: exFAT doesn’t support POSIX ownership/permissions.
Since these are not supported, it also means mount must fake both ownership and permissions data. By default it’s root:root. Mount options `uid=` and `gid=` are used to set uid:gid to the desired value.
Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
So, I should add the uid and gid properties in my fstab, right? Being this the result:
# /dev/sda2
UUID=7E7B-E954 /home/leo/Files exfat rw,relatime,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro,uid=leo,gid=leo 0 2
Offline
Yes, but `uid` and `gid` are numerical.
Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
sorry for the late reply. I've been really busy these days. Anyways, thanks for your help. I managed to solve the issue. Here are the steps I followed.
Find my user uid and gid:
id leo
uid=1000(leo) gid=1000(leo) groups=1000(leo),998(wheel),996(audio),987(storage),985(video)
Unmounted the partition to edit:
umount -R /home/leo/Files
Edited /etc/fstab
sudo nano /etc/fstab
# /dev/sda2
UUID=7E7B-E954 /home/leo/Files exfat rw,relatime,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro,uid=1000,gid=1000 0 2
And rebooted
Offline