diff --git a/tsshbatch.py b/tsshbatch.py index 8122a6e..64d12db 100755 --- a/tsshbatch.py +++ b/tsshbatch.py @@ -20,7 +20,7 @@ CMDINCL = PROGENV + "CMDS" HOSTINCL = PROGENV + "HOSTS" -CVSID = "$Id: tsshbatch.py,v 1.203 2014/12/04 23:11:50 tundra Exp $" +CVSID = "$Id: tsshbatch.py,v 1.204 2014/12/04 23:34:35 tundra Exp $" VERSION = CVSID.split()[2] CPRT = "(c)" PROGDATE = "2011-2014" @@ -356,11 +356,13 @@ destination += host + HOSTSEP + os.path.basename(srcfile) PrintStdout(iTXFILE % (host + ":" + srcfile, destination)) sftp.get(srcfile, destination) + os.chmod(destination, sftp.stat(srcfile).st_mode) else: destination += os.path.basename(srcfile) PrintStdout(iTXFILE % (srcfile, host + ":" + destination)) sftp.put(srcfile, destination) + sftp.chmod(destination, os.stat(srcfile).st_mode) sftp.close() ssh.close()