diff options
Diffstat (limited to '')
-rwxr-xr-x | git-init-acl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/git-init-acl b/git-init-acl index 50950b5..1a40dff 100755 --- a/git-init-acl +++ b/git-init-acl @@ -16,9 +16,10 @@ acl_mask() { add_to_acl() { # Recursively apply all necessary ACL settings as we may be reinitializing # the git repository with additional authorised users. - # Take care *not* to recalculate the ACL mask (-n), since rwX translates to - # a mask of rwx even on non-directory files. - setfacl -Rnm "d:u:$2:rwX,u:$2:rwX" "$1" + # Take care to specify the ACL mask explicitly to make sure it is set to + # rw- on files and rwx on directories (automatic recalculation ends up + # setting rwx even on non-directory files) + setfacl -Rm "d:u:$2:rwX,u:$2:rwX,d:m:rwX,m:rwX" "$1" } test $# -ge 1 || usage |