1

I have Windows and Arch Linux in dual with UEFI. I want to mount my another NTFS partition in Arch. I mounted the partition with mount /dev/sda5 /mnt/Apps command. Then added the output of genfstab -U /mnt/Apps in /etc/fstab file. The output is as follows:

UUID=01D158CC7C2A61A0 /mnt/Apps ntfs rw,nosuid,nodev,user_id=0,group_id=0,allow_other 0 0

But when I unmount and remount that partition all files and folders shows with root uid and gid and 0777 permission. I also tried with changing uid and gid to 1000 but same result. So, my question, what is the correct way to add NTFS partitions in fstab so that I can read & write all file and folder both with normal user (1000:1000) and root (0:0)?

  • You've said you've tried with uid and gid set to 1000 but in your fstab entry you have set user_id and group_id not uid and gid. Which of these two did you try? – Philip Couling Apr 11 at 10:23
  • I tried with both. But the permission is 0777 always. – Biswapriyo Apr 11 at 10:26
  • @Biswapriyo see askubuntu.com/a/11843/158442 - use fmask and dmask if you want to set permissions. – muru Apr 11 at 10:42
2

As commented by muru from this answer, I have added the fmask and dmask permissions in /etc/fstab and now it shows correct permissions. I have change that line as follows:

UUID=01D158CC7C2A61A0 /mnt/Apps ntfs rw,auto,user,fmask=133,dmask=022,uid=1000,gid=1000 0 0

This sets all files 0644 and directories 0755 permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.