raiseAnsibleError('Failed to set file mode on remote files (rc: {0}, err: {1})'.format(res['rc'],res['stderr']))
else:
ifexecute:
mode='rx'
@ -325,14 +329,18 @@ class ActionBase(with_metaclass(ABCMeta, object)):
# fs acls failed -- do things this insecure way only
# if the user opted in in the config file
self._display.warning('Using world-readable permissions for temporary files Ansible needs to create when becoming an unprivileged user which may be insecure. For information on securing this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user')
raiseAnsibleError('Failed to set file mode on remote files (rc: {0}, err: {1})'.format(res['rc'],res['stderr']))
else:
raiseAnsibleError('Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user. For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user')
elifexecute:
# Can't depend on the file being transferred with execute
# permissions. Only need user perms because no become was