I have an Linux Debain 10 server running an web project.
The project (parent) folder is as follows:
ls -la:
drwxrwxr--+ 7 some_user some_group 4096 Jul 21 11:01 .
getfacl:
# file: .
# owner: some_user
# group: some_group
user::rwx
user:some_user:rwx
group::rwx
group:www-data:rwx
group:some_group:rwx
mask::rwx
other::r--
default:user::rwx
default:user:some_user:rwx
default:group::rwx
default:group:www-data:rwx
default:group:some_group:rwx
default:mask::rwx
default:other::r--
As you can see, inheritance rules are set to not limit any privileges (mask = rwx) and to inherit "some_group" with "rwx" as well. This works when I make the folder with "mkdir" command it gives me the privileges reqested, but when I upload them from my Windows 10 machine using FTP client it doesn't work anymore and stripping privileges for the uploaded subfolder as follows:
ls -la:
drwxr-xr-x+ 5 some_user some_group 4096 Jul 21 11:01 uploads
getfacl:
# file: uploads
# owner: some_user
# group: some_group
user::rwx
user:some_user:rwx #effective:r-x
group::rwx #effective:r-x
group:www-data:rwx #effective:r-x
group:some_group:rwx #effective:r-x
mask::r-x
other::r-x
default:user::rwx
default:user:some_user:rwx
default:group::rwx
default:group:www-data:rwx
default:group:some_group:rwx
default:mask::rwx
default:other::r--
Thus cutting out the write privillege because "mask" is out of sudden "r-x" instead of "rwx".
I'v tried Googling, reading docs, setting "umask 007" with no effect and setting "local_umask=007" in config file FTP "/etc/vsftpd.conf" as I'm using VSFTP.
The only way, how I may solve the problem now is manually setting "chmod -R g+w /folder" every time I upload the folder with FTP. Can I make FTP uploaded files to get assigned with the right privilleges somehow? Any ideas will be appreciate.
this is close but don't think it has something to do with my problem: File ACL mask calculation: why?