Ubuntu: How do I correctly mount a NTFS partition in /etc/fstab?
The Question: After a nasty episode (my second, you'd think I'd learn) caused by unsupervised
automated podcast downloads filling my entire partition, I've finally moved
just ~/Music to its own partition. The partition I'm using was already
formatted NTFS (this is the genius part: when I got this computer three years
ago, I actually set it up with a 20G music partition precisely because I'd had
this problem before, but I never actually organized myself to store music on
it. So that's my backstory. Here's what I need now:
I have two partitions that I want to start mounting on startup:
/dev/sda3 /mnt/devel ext4 defaults 0 2
/dev/sda2 /mnt/excess ntfs defaults 0 2
The ext4 partion mounts fine (owned by me, writeable only by me), but the ntfs
mounts owned by root with read and write permission for all. I'm not sure how
to fix this. Is there something quirky about ntfs or did I do something
elsewhere that's causing this problem?
drwxr-xr-x 7 amanda amanda 4096 2012-03-14 19:07 devel
drwxrwxrwx 1 root root 4096 2012-03-14 22:38 excess
Solutions Sample (Please watch the whole video to see all solutions, in order of how many people found them helpful):
== This solution helped 4 people ==
Might not be a good solution , but you can always map user id to your own one ,
or the group id:
Just an example here , my user id was 1000
/dev/sda5 /mnt/excess ntfs defaults,uid=1000,rw 0 0
In that case , all files mounted owned by user ided 1000
== This solution helped 79 people ==
Permissions for ntfs and vfat file systems must be set with the dmask, fmask
and umask options. dmask controls permissions for directories, fmask controls
permissions for files, and umask controls both. Since these options set masks,
they should be the complement of the permissions you want. For example, rwx for
the owner and rx for others is 022 rather than 755.
To set the owner, use the uid and gid options for user and group, respectively.
You can find your UID with the command id -u. To find your GID, use id -g.
These values are both usually 1000.
A common set of mount options for ntfs is
uid=1000,gid=1000,dmask=027,fmask=137. This sets you as the owner of the drive,
and sets the permissions to drwxr-x---.
Here are two lines from my /etc/fstab working
UUID=EEA2B69CA2B668AB /WIN_C ntfs-3g
UUID=65AEC0E830EA0497 /WIN_D ntfs-3g rw 0 0
If you get no visible error after rebooting and partitions stay readonly or you
get an error similar to:
Error mounting /dev/sda6 at /media/WindowsDrive:
Command-line `mount -t "ntfs" -
o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/
sda6" "/media/rolindroy/Media Center"' exited with non-zero exit status 14: The
disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sda6': Operation not permitted The NTFS partition is in
an unsafe state.
Please resume and shutdown Windows fully (no hibernation or fast restarting),
or mount the volume read-only with the 'ro' mount option
This is because Windows 8 and 10 offer a "Fast Startup" option that depends on
a "non-complete" shutdown. You can disable fast startup by following these
With thanks & praise to God! With thanks to the many people who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music: https://www.bensound.com/royalty-free-music | Images: https://stocksnap.io/license & others | With thanks to user rotgers (https://askubuntu.com/users/340181), user Panther (https://askubuntu.com/users/35795), user Lekensteyn (https://askubuntu.com/users/6969), user Jonathan (https://askubuntu.com/users/53787), user Gayan Weerakutti (https://askubuntu.com/users/304559), user daisy (https://askubuntu.com/users/25430), user CMP (https://askubuntu.com/users/224510), user bessman (https://askubuntu.com/users/44965), user Avinash Raj (https://askubuntu.com/users/202806), user Amanda (https://askubuntu.com/users/13049), user abu_bua (https://askubuntu.com/users/790920), and the Stack Exchange Network (http://stackoverflow.com/questions/113733). Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything should be amiss at Roel D.OT VandePaar A.T gmail.com.