mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-05 02:03:09 +00:00
Merge pull request #2998 from SirScott/runner-permissions
Ensure the tmp_path is sufficiently open.
This commit is contained in:
@@ -662,7 +662,7 @@ class Runner(object):
|
||||
basetmp = os.path.join('/tmp', basefile)
|
||||
|
||||
cmd = 'mkdir -p %s' % basetmp
|
||||
if self.remote_user != 'root':
|
||||
if self.remote_user != 'root' or (self.sudo and self.sudo_user != 'root'):
|
||||
cmd += ' && chmod a+rx %s' % basetmp
|
||||
cmd += ' && echo %s' % basetmp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user