I have a dual-boot PC, Ubuntu / Windows 10, that share access to a NTFS disk partition (mounted as
/DATA/ in Ubuntu).
I need to avoid the "Permission denied" error when a
chmod command is executed on a file in such shared partition, regardless the user calling this command. This is because I
chmod is called as part of bigger procedures and the users cannot just avoid them, and when they return an error the whole procedure stops.
What I tried:
/DATA/ is now being mounted with the
permissions option (mapping file is activate) and under a non-root user that has the ID of 1001, and all users are part of the the group with ID of 1003, to which
rwx is allowed, i.e.:
UUID=... /DATA ntfs auto,users,rw,permissions,umask=007,uid=1001,gid=1003 0 0
This solution ALMOST works. Everyone can r+w and, when the user 1001 calls
chmod we don't get an error. It does not make any change indeed, but it is not a problem. The problem is that for other users the command
chmod still trigger errors as they are not considered the owners of the files.
Is there an way to give ownership of the partition mounted on
/DATA/ to all users? Or to the user who first logins at least?
Or at least make the
chmod command never return an error?