4

I'm trying to set permissions on a server between users using ACLs. When I'm checking their status on one of directories using getfacl dir10, it shows:

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

What do these flags mean? How can I change them?

4

from 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.)

the set these values, see 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'.
0

@umläute Is completely correct about what the flag means. However, to get rid of the -s- you need to remove it from the UNIX permissions.

I.e.

chmod g-s ./dir10

The --restore=file only reverts the permissions to a previous level (which may remove the setgid, or may not.) And I don't think it works on directories, only files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.