setting umask for a directory so that all directories, executable file(.sh , .cmd, .bat) are 750 and regular file 640

need to create and change existing file and directory such that all directories and executable files(*.sh, *.bat, *.cmd ..) are 750 and regular file are 640 . I need to this in shell and python both. I like to set umask to 027 while default is 022 for existing directory …. can’t change default umask. … Read more

Convenient WordPress Web Directory Permissions?

I’m setting up a webserver for WordPress. WordPress requires it’s stuff to be owned by www user or it has problems installing plugins and themes (asks for server FTP credentials, it’s stupid, I know). This wouldn’t be a problem, but I want to give one ssh user an empty WWW directory so they could download/unpack/setup … Read more

setfacl issue on subdirs created by server

I’m facing issues on inheriting the parent permissions for the folders created by PHP script which is executed by the server. I’ve created the deployer user, added to www-data group and set the initial folder and file config like below. usermod -a -G www-data deployer chown -R www-data:www-data /var/www chmod -R 0775 /var/www find /var/www … Read more

Why does setfacl turn on the group execute permission on files even when specifying X?

I’m seeing strange behaviour with setfacl setting the eXecute bit on the group permission for files in some situations, confirmed on CentOS 7. As user root with unmask 0002: mkdir foo touch foo/bar setfacl -Rdm u:jburchell:rwX foo setfacl -Rm u:jburchell:rwX foo touch foo/baz ls -l foo -rw-rw-r–+ bar -rw-rw-r–+ baz Now, this is where I’m … Read more

nfs4_setfacl issue when using symlinks: Failed setxattr operation: Invalid argument An error occurred during recursive file tree walk

I am working in 2 environments: 1 is a VM running RHEL 7 (PRETTY_NAME=”Red Hat Enterprise Linux Server 7.9″) for quriosity The other is a kubernetes pod running an ubuntu (PRETTY_NAME=”Ubuntu 18.04.5 LTS”). There is an user (jbossrdi) that can run nfs4_acl commands in these environments in order to change ACL for dirs and files. … Read more

Samba4: ACLs inheritance: owner group will be changed to “domain users” in new created files/dirs

Samba Version 4.3.11 on Ubuntu Xenial server (16.04) In smb.conf I have: Server role: ROLE_DOMAIN_MEMBER [global] … inherit permissions = Yes inherit acls = Yes # I needed this due to another issue server max protocol = NT1 max protocol = NT1 protocol = NT1 … [institute] … map acl inherit = Yes store dos … Read more

Overwrite directory creation mode using linux acl

I try to give specific user(for example “test”) right to read any new created directory. I do that using: undefine@undefine-ThinkPad-T430s:~/test$ getfacl . # file: . # owner: undefine # group: undefine user::rwx group::rwx other::r-x undefine@undefine-ThinkPad-T430s:~/test$ setfacl -d -m u:test:rX . undefine@undefine-ThinkPad-T430s:~/test$ getfacl . # file: . # owner: undefine # group: undefine user::rwx group::rwx other::r-x … Read more