From f62224497eb527795a11a39808f5eb82671cf962 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 21 Nov 2016 12:09:23 -0800 Subject: [PATCH] Fix setfacl for Solaris with POSIX acl support. Tested on Linux and freebsd. Fixes #17919 (cherry picked from commit d90638ad40a6bd76402fe666c71d8ad9591bffb2) --- lib/ansible/plugins/action/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py index d2ef5988e33..9ab7d877c3f 100644 --- a/lib/ansible/plugins/action/__init__.py +++ b/lib/ansible/plugins/action/__init__.py @@ -359,9 +359,12 @@ class ActionBase(with_metaclass(ABCMeta, object)): # Try to use file system acls to make the files readable for sudo'd # user if execute: - mode = 'rx' + mode = 'r-x' else: - mode = 'rX' + ### Note: this form fails silently on freebsd. We currently + # never call _fixup_perms2() with execute=False but if we + # start to we'll have to fix this. + mode = 'r-X' res = self._remote_set_user_facl(remote_paths, self._play_context.become_user, mode) if res['rc'] != 0: