0

I have a dual boot system (Windows 10/Archlinux) and I have created a NFTS partition which is mounted at startup via /etc/fstab so I can access it from both OS'es.

The fstab file shows that the partition is mounted with read and write permissions (rw) with user_id=0 and group=0, both values related to the root user, followed by the option allow_other which lets my regular user access the mounted file system.

When files or folders are created by the regular user (non root) into the mounted partition those are created as if they were owned/created by root as shown by ls -l command. Even if I try to use chmod, the permissions are unaffected and no errors are shown.

I've also tried changing in /etc/fstab both user_id and group_id to 1000, corresponding to the non-root user and reloading entries with sudo mount -av. After that, I created a file in the mounted partition but it keeps showing the root as the user owner.

I suspect the issue could be the fstab configuration, but I'm not sure. Next I'll share some info related to the configuration of the partition inside the fstab file and the before mentioned commands and its outputs:

/etc/fstab/
UUID=B23A2CB93A2C7C8B /mnt/Contenido ntfs-3g rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096 0 0
$ cd /mnt/Contenido

$ whoami
> joao

$ touch random_file

$ ls -l
> -rwxrwxrwx 1 root root     0 Feb 19 16:45  random_file

$ sudo chmod -v 700 random_file
> mode of 'random_file' changed from 0777 (rwxrwxrwx) to 0700 (rwx------)

$ ls -l
> -rwxrwxrwx 1 root root     0 Feb 19 16:45  random_file
>
3
  • 2
    Have you read man ntfs-3g? It explains this specifically Feb 20 at 18:50
  • No, I haven't read it. Gonna do it right now.
    – JulioOAO
    Feb 20 at 21:07
  • Just like @ChrisDavies said, the answer is in the man ntfs-3g, in the Access Handling and Security section to be precise. Following that I could do ntfs-3g -o uid=1000,gid=1000,umask=700 /dev/nvme0n1p6 /mnt/Contenido/ in order to get my regular user as the owner. I don't know if it worth mention but it is important to rebuild ntfs-3g with integrated ´FUSE´ support so the regular user can mount the file system, as explained in the Arch Wiki
    – JulioOAO
    Feb 21 at 16:26

1 Answer 1

2

As Chris Davies said in the comments section, the answer is in man ntfs-3g, in the Access Handling and Security section, to be precise.

I could do ntfs-3g -o uid=1000,gid=1000,umask=700 /dev/nvme0n1p6 /mnt/Contenido/ to get my regular user as the owner.

I don't know if it is worth mentioning, but it is important to rebuild ntfs-3g with integrated FUSE support so the regular user can mount the file system, as explained in the Arch Wiki.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .