Skip to content

Instantly share code, notes, and snippets.

@AndreaGhizzoni
Last active April 30, 2019 10:35
Show Gist options
  • Save AndreaGhizzoni/2a2003999c5533a8b59f4e42f6bb4ffb to your computer and use it in GitHub Desktop.
Save AndreaGhizzoni/2a2003999c5533a8b59f4e42f6bb4ffb to your computer and use it in GitHub Desktop.

how to mount ntfs drive with correct permission [src]

Find the UUID of your device:

$ blkid
/dev/sda1: LABEL="xxx" UUID="yyyyyyyy" TYPE="vfat" PARTUUID="kkkkkk"
/dev/sdb1: LABEL="xxx" UUID="<selected-device-uuid>" TYPE="ntfs" PTTYPE="dos" PARTUUID="uuuuuuuu"

Find the uid and gid of your current user:

$ id
uid=9999(user) gid=9999(user) ....

Now modify /etc/fstab by adding the following line:

[...]
UUID=<selected-device-uuid> /mnt/point/path ntfs-3g defaults,umask=002,uid=9999,gid=9999 0 0

Finally reboot, and the device /dev/sdb1 should be mounted to /mnt/point/path with your user. More infos for umask stuff @ cyberciti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment