I have a local SSD disk, which is mounted via /etc/fstab on my Ubuntu machine:
/dev/sdb2 /media/Store ntfs-3g rw,nosuid,nodev,default_permissions,umask=0002,uid=deniss,gid=deniss 0 0
I can read and write anything on that drive.
Now I have installed nginx and php-fpm, and added www-data
to my group and www-data
in my group so i can edit files from both groups:
$ groups deniss
deniss : deniss adm cdrom sudo dip www-data plugdev lpadmin lxd sambashare
$ groups www-data
www-data : www-data deniss
nginx user (www-data) can read and write all files on mounted share, the problem starts when it tries to chmod files on a drive:
$ sudo -u www-data chmod 644 test.txt
chmod: changing permissions of '/media/Store/file.txt': Operation not permitted
Not that I need www-data to chmod files, but there are local websites running on the drive, and chmod sometimes is integrated into libraries and frameworks and I cannot disable them.
ntfs-3g
driver is based on FUSE, meaning that the filesystem driver is running as an user-space process, which causes some overhead, so the performance of the disk is not going to be as good as it could be with a Linux-native filesystem type.