0

Why I cannot change the ownership on mounting ntfs drive?

I give uid=1000,gid=1000, etc in my /etc/fstab file, but found it is not working. So I'm testing it out on command line:

root@host:~# mount | grep /mnt/tmp1 | wc
      0       0       0

root@host:~# mount -o uid=1000 /dev/nvme0n1p4 /mnt/tmp1/

root@host:~# mount | grep /mnt/tmp1 /dev/nvme0n1p4 on /mnt/tmp1 type fuseblk (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)

root@host:~# umount /mnt/tmp1

root@host:~# mount -o user_id=1000 /dev/nvme0n1p4 /mnt/tmp1/

root@host:~# mount | grep /mnt/tmp1 /dev/nvme0n1p4 on /mnt/tmp1 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)

$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 21.10 Release: 21.10 Codename: impish

$ apt-cache policy mount mount: Installed: 2.36.1-8ubuntu1 Candidate: 2.36.1-8ubuntu2 Version table: 2.36.1-8ubuntu2 500 500 http://archive.ubuntu.com/ubuntu impish-updates/main amd64 Packages *** 2.36.1-8ubuntu1 500 500 http://archive.ubuntu.com/ubuntu impish/main amd64 Packages 100 /var/lib/dpkg/status

Am I missing something? (This is Ubuntu 21.10 impish)
Why I cannot change the ownership on mounting ntfs drive?

xpt
  • 1,197

2 Answers2

0

Changing the ownership is absolutely possible. See this page: Mount NTFS partition at startup, with non-root user as owner and Change owner of internal hard drive partition from root to user

Basically, add uid=1000,gid=1000,permissions and possibly play with umask=000,nls=iso8859-1,users. Use mount -a to test without rebooting.

alchemy
  • 850
-1

NTFS is simply not capable of POSIX ownership and permissions, which is how permissions and ownership is handled in Ubuntu.

If you have a task that needs to store data on a file system with POSIX ownership or permissions, you cannot use a NTFS file system.

Nmath
  • 12,664