Что означает поле «флаги» в getfacl?

Что означает поле «флаги» в getfacl?

Я пытаюсь установить разрешения на сервере между пользователями, использующими ACL. Когда я проверяю их статус в одном из каталогов, используя getfacl dir10, он показывает:

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

Что означают эти флаги? Как их изменить?

решение1

от 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.)

чтобы установить эти значения, см 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'.

решение2

@umläute полностью прав относительно значения флага. Однако, чтобы избавиться от него, -s-нужно удалить его из UNIXразрешений.

Т.е.

chmod g-s ./dir10

Единственное, --restore=fileчто возвращает разрешения на предыдущий уровень (что может удалить setgid, а может и нет). И я не думаю, что это работает с каталогами, только с файлами.

Связанный контент