Ho alcuni ACL definiti in una directory così:
# owner: root
# group: root
user::rwx
group::r--
mask::r-x
other::r--
default:user::r--
default:group::r--
default:mask::r-x
default:other::r--
Vorrei che tutti i nuovi file creati in quella cartella fossero u: apache: r-- e qualsiasi nuova directory sia u: apache: rx. Come posso specificare quell'intento usando gli ACL?
Ho provato il -dm u:apache:rX
e non sembra fare nulla di diverso rispetto al solorx
overt htdocs # getfacl .
# file: .
# owner: root
# group: root
user::rwx
user:apache:r--
group::r--
mask::r-x
other::r--
default:user::r--
default:user:apache:r--
default:group::r--
default:mask::r--
default:other::r--
overt htdocs # setfacl -dm u:apache:rx .
overt htdocs # touch blah.txt
overt htdocs # getfacl blah.txt
# file: blah.txt
# owner: root
# group: root
user::r--
user:apache:r-x #effective:r--
group::r--
mask::r--
other::r--
overt htdocs # rm blah.txt
overt htdocs # setfacl -dm u:apache:rX .
overt htdocs # touch blah.txt
overt htdocs # getfacl blah.txt
# file: blah.txt
# owner: root
# group: root
user::r--
user:apache:r-x #effective:r--
group::r--
mask::r--
other::r--
L'autorizzazione X maiuscola sembra essere utile solo per l'impostazione delle autorizzazioni correnti, non per l'impostazione delle autorizzazioni predefinite:
overt htdocs # setfacl -x u:apache blah.txt
overt htdocs # getfacl blah.txt
# file: blah.txt
# owner: root
# group: root
user::r--
group::r--
mask::r--
other::r--
overt htdocs # setfacl -m u:apache:rX blah.txt
overt htdocs # getfacl blah.txt
# file: blah.txt
# owner: root
# group: root
user::r--
user:apache:r--
group::r--
mask::r--
other::r--
#effective
testo! Grazie per la spiegazione di come le maschere effettuano autorizzazioni efficaci.