4

Using setfacl command line arguments, is there a way to set/unset a single flag as the following command will do ?

chmod g+x FILE

Please note that:

setfacl g::x   FILE
setfacl g::--x FILE

are equivalent and will set executable bit and remove read a write flag. And thus these commands are not setting/unsetting an individual flag but 3 flags at once.

vaab
  • 542

2 Answers2

1

What about using effective rights mask:

[test@abcdef ~]$ setfacl -m g::rwx test/
[test@abcdef ~]$ getfacl test/
# file: test/
# owner: test
# group: test
user::rwx
group::rwx
mask::rwx
other::---

[test@abcdef ~]$ setfacl -m m::rw test/
[test@abcdef ~]$ getfacl test/
# file: test/
# owner: test
# group: test
user::rwx
group::rwx                      #effective:rw-
mask::rw-
other::---
Andrew Smith
  • 1,151
0

Do you mean something like this?

setfacl -m g::x FILE