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를 제거할 수도 있고 제거하지 않을 수도 있음). 그리고 디렉토리에서는 작동하지 않고 파일에서만 작동한다고 생각합니다.

관련 정보