By default, unless the partition being mounted is an ext2/3/4 partition or a partition that can handle UNIX style permissions (such as Mac HFS/HFS+ partitions), the drive gets mounted as
root:root for user/group ownership by default. exFAT/FAT/FAT32/NTFS do not support UNIX style permissions, so you can't use these types of permissions.
As such, you have to set permissions at mount to what you need them to be. There're a lot of different options that you could set, but we'll borrow some from my other answer on how to mount NTFS so it can be read by any user but adapt it for your user only.
First, we need to get some information. You will need to run the
id command, in the terminal. This will give us some information we will need when we construct the mount points, namely your
gid. Below is the example of such output from my own laptop, though yours will probably differ substantially:
uid=1000(teward) gid=1000(teward) groups=1000(teward),4(adm),6(disk),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare),132(sbuild),137(lxd),140(wireshark),998(pgadmin4)
Of relevance in this specific instance is the
gid values, which in my case are
1000 for both. Yours might differ, but we'll need to keep these values handly.
Next, let's restructure your
/etc/fstab line. Your system has done
auto for detecting the external disk, which is fine, but there's a small issue with this - this relies on the OS being able to determine the type of file system on disk. So we'll replace that with
This makes the following the beginning of your
/dev/sdb4 /mnt/sdb4 ntfs
The key part of what you need to do now, though is adjust the options for mounting.
defaults is a good start point but not what you need. Ideally, you should have the following additional options in your options:
Note that you need to replace
GID in the
gid= lines with the numeric
gid values we got earlier from
Because you might wonder what these options do, let me pull my explanation with some edits from my other answer:
locale=en_US.utf8 - enforces the US English locale with UTF8
windows_names - enforces that Windows name restrictions are in place for new files in the partition.
umask=7007 - Basically, inverse chmod. Define what permissions are not permitted for files. Essentially, I don't prohibit anything
read/write/execute here except for 'other users' than yourself, so all files on the mounted location get,
effectively, read, write, and execute privileges for your user. I don't want any of
the special bits set (setuid, setgid, sticky), so I have to eliminate
them from the first octet - since the numeric sum of those is a '7'
and i'm prohibiting those permissions, I put a leading 7.
gid=1000 - Have the partition mounted into that folder with user and group ownership of UID (User ID) and GID (Group
1000 (this is my user's user and group,
teward, on the
Adding these to the options line will allow your external device to be compliant with your Windows dual boot with file naming, and also enforce UTF8. It'll also set permissions properly, so that your user only can have read/write on the partition. This makes your
/etc/fstab line this:
/dev/sdb4 /mnt/sdb4 auto defaults,x-gvfs-show,locale=en_US.utf8,windows_names,umask=7000,uid=UID,gid=GID 0 0
We don't need to do anything with the last two zeroes, that's OK to leave there. Just make sure you updated the
UID values to the actual values.
sudo umount /dev/sdb4 && sudo mount /dev/sdb4 to unmount and remount the partition with the new options. You should then have read/write privileges on the entire disk now.