Commit 176bf3cb by Michael DeHaan

Save extra chmod step if sudoing to root

parent 0f052f2f
......@@ -318,7 +318,7 @@ class Runner(object):
tmp_src = tmp + os.path.basename(source)
conn.put_file(source, tmp_src)
# fix file permissions when the copy is done as a different user
if self.sudo and self.sudo_user:
if self.sudo and self.sudo_user != 'root':
self._low_level_exec_command(conn, "chmod a+r %s" % tmp_src, tmp)
# run the copy module
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment