title: How do ACLs influence ls / stat() results?
body: <p>Why would a directory show <code>drwxrwxr-x+</code> when there is no group-writable bit?</p>
  
  <p>Let's give one extra user (john) <code>rwx</code> permission on a directory, like so:</p>
  
  <pre><code>$ mkdir logfiles
  $ setfacl -m user:john:rwx logfiles
  $ getfacl -ce logfiles
  user::rwx
  user:john:rwx                   #effective:rwx
  group::r-x                      #effective:r-x
  mask::rwx
  other::r-x
  </code></pre>
  
  <p>That's just how I want things, and john now has access equivalent to the directory owner. However,</p>
  
  <pre><code>$ ls -ld logfiles
  drwxrwxr-x+ 2 bob users 4096 Mar  6 22:38 logfiles
  
  $ find -perm +020 -ls
    8197    4 drwxrwxr-x   2 bob      users        4096 Mar  6 22:38 ./logfiles
  </code></pre>
  
  <p>No group has write permission, but the output of ls and the matching result from find would suggest otherwise. This is coming directly from the st_mode field of the lstat(2) system call; why is the <code>S_IWGRP</code> bit being set?</p>