mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
Ensure remote files are chmod'd properly for su/su_user too
Fixes #8594
This commit is contained in:
parent
0c4a7492bf
commit
cdf938f2c2
4 changed files with 4 additions and 4 deletions
|
@ -76,7 +76,7 @@ class ActionModule(object):
|
|||
# handle check mode client side
|
||||
# fix file permissions when the copy is done as a different user
|
||||
if copy:
|
||||
if self.runner.sudo and self.runner.sudo_user != 'root':
|
||||
if self.runner.sudo and self.runner.sudo_user != 'root' or self.runner.su and self.runner.su_user != 'root':
|
||||
self.runner._remote_chmod(conn, 'a+r', tmp_src, tmp)
|
||||
# Build temporary module_args.
|
||||
new_module_args = dict(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue