Snažím se nastavit oprávnění na serveru mezi uživateli pomocí ACL. Když kontroluji jejich stav v jednom z adresářů pomocí getfacl dir10, ukazuje:

root@svn:/srv/resources/somedir# getfacl dir10 # file: dir10 # owner: root # group: mygroup # flags: -s- 

Co znamenají tyto příznaky? Jak je mohu změnit?

Odpovědět

z man getfacl:

 The output format of getfacl is as follows: 1: # file: somedir/ 2: # owner: lisa 3: # group: staff 4: # flags: -s- [...] Line 4 indicates the setuid (s), setgid (s), and sticky (t) bits: either the letter representing the bit, or else a dash (-). This line is included if any of those bits is set and left out otherwise, so it will not be shown for most files. (See CONFORMANCE TO POSIX 1003.1e DRAFT STANDARD 17 below.) 

nastavte tyto hodnoty, viz man setfacl:

 --restore=file Restore a permission backup created by `getfacl -R" or similar. All permissions of a complete directory subtree are restored using this mechanism. If the input contains owner comments or group comments, setfacl attempts to restore the owner and owning group. If the input contains flags comments (which define the setuid, setgid, and sticky bits), setfacl sets those three bits accordingly; otherwise, it clears them. This option cannot be mixed with other options except `--test". 

Odpověď

@ umläute Je zcela správné, co znamená příznak. Chcete-li se však -s- zbavit, musíte jej odebrat z oprávnění UNIX.

Tj.

chmod g-s ./dir10 

--restore=file pouze vrátí oprávnění na předchozí úroveň (což může odstranit setgid, nebo nemusí.) A nemyslím si, že to funguje na adresářích, pouze na souborech.

Napsat komentář

Vaše e-mailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *