Score:0

Linux Debian ACL, is default mask overriden by something in FTP?

ga flag

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?

tsc_chazz avatar
vn flag
Sounds to me like a vsftpd config issue. Check specifically the `vsftpd.conf` file, both global and user, for the settings `local_umask` (I see you've done that one for global, but check the user file if there is one) and `file_open_mode`.
Jiří Žák avatar
ga flag
@tsc_chazz Unfortunelly "file_open_mode=0777" has no effect in global config and my ftp user doesn't have any local configuration. Thanks anyway, guess if I made reproduction it would be simpler to find out the problem, but there's too many "variables" in system I believe.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.