I have Ubuntu 18.04 installed on a SSD with a larger separate HDD with 1 partition that contains Windows 10 and another NTFS partition that I use for storing all sorts of data. I have added the NTFS data partition to mount at startup using the Disks Utility in Ubuntu, it auto mounts just fine but only has read access. I would like to have this partition also have write access from Ubuntu. But I cant figure out how. (Fast Startup in Windows 10 is disabled)
Heres my fstab file (The last entry, dev/sdb4, is the NTFS data partition):
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda3 during installation
UUID=0e4a3e97-171f-4c96-9260-e2eb217f4302 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda2 during installation
#UUID=1022-A48D /boot/efi vfat umask=0077 0 1
# swap was on /dev/sda1 during installation
UUID=c59f57b3-26c6-4fb1-82ae-29e676a973b1 none swap sw 0 0
UUID=1022-A48D /boot/efi vfat defaults 0 1
/dev/sdb4 /mnt/sdb4 auto defaults,x-gvfs-show 0 0
These are the permissions for this partition
Also please explain how this drive can be added to the Favorites (the side bar which shows the running apps or apps that you have marked as favorite) in 18.04?
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 youruid
andgid
. Below is the example of such output from my own laptop, though yours will probably differ substantially:Of relevance in this specific instance is the
uid
andgid
values, which in my case are1000
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 doneauto
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 withntfs
.This makes the following the beginning of your
/etc/fstab
line: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
UID
andGID
in theuid=
andgid=
lines with the numericuid
andgid
values we got earlier fromid
.Because you might wonder what these options do, let me pull my explanation with some edits from my other answer:
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:We don't need to do anything with the last two zeroes, that's OK to leave there. Just make sure you updated the
GID
andUID
values to the actual values.Then, use
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.