I can't manage to set x bit to created file.
archemar@foobar:~/D> echo echo hello world > v.sh
archemar@foobar:~/D> ls -l v.sh
-rw-rw-r--+ 1 archemar group1 17 Apr 12 08:12 v.sh
no x-bit, let's look at acl
archemar@foobar:~/D> getfacl v.sh
# file: v.sh
# owner: archemar
# group: group1
user::rw-
group::rwx #effective:rw-
group:group1:rwx #effective:rw-
mask::rw-
other::r--
group1 is rwx
in acl !!
let's look at acl for local dir
archemar@foobar:~/D> getfacl .
# file: .
# owner: FTP_D_adm
# group: admin
user::rwx
group::rwx
group:group2:rwx
group:admin:rwx
group:group1:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::rwx
default:group:group1:rwx
default:mask::rwx
default:other::r-x
I am part of group1:
archemar@foobar:~/D> id
uid=1001(archemar) gid=1001(group1) groups=1001(group1),16(dialout),33(video)
let's try to execute
archemar@foobar:~/D> ./v.sh
-bash: ./v.sh: Permission denied
setting g+x is trivial, but real file will come through ftp. Is there a way to have bit x set ?
OS is suse 11.4, directory is NFS 3 mounted, ACL is set on filesystem.
rw
. This is because ACL will never implicitly grant execution rights as this would be dangerous. In fact you can't even dod:g:root:rwx
, the file would still be effectiverw
despite being created by root and belonging to group root. – pzkpfw Feb 10 '21 at 13:00