From 4f2b99c1e079b266256beb854e36b22310b82ad9 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Mon, 10 Nov 2014 20:32:05 +0300 Subject: [PATCH] acl: Fix X support in ACL permissions If you try to set rwX permissions, ACL fails to set them at all. Expected: $ sudo setfacl -m 'group::rwX' www ... drwxrwxr-x 2 root root 4096 Nov 10 17:09 www With Ansible: acl: name=/var/www permissions=rwX etype=group state=present ... drwxrw-r-x 2 root root 4096 Nov 10 17:30 www x for group is erased. =/ --- files/acl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/acl.py b/files/acl.py index 30c533e006c..9790f8c927f 100644 --- a/files/acl.py +++ b/files/acl.py @@ -111,6 +111,9 @@ def normalize_permissions(p): perms[1] = 'w' if char == 'x': perms[2] = 'x' + if char == 'X': + if perms[2] != 'x': # 'x' is more permissive + perms[2] = 'X' return ''.join(perms) def split_entry(entry):