| |
@@ -380,7 +380,7 @@
|
| |
elif self.host.ssh_password:
|
| |
password_file = os.path.join(self.control_dir.path, 'password')
|
| |
with open(password_file, 'w') as f:
|
| |
- os.fchmod(f.fileno(), 600)
|
| |
+ os.fchmod(f.fileno(), 0o600)
|
| |
f.write(self.host.ssh_password)
|
| |
f.write('\n')
|
| |
argv = ['sshpass', '-f', password_file] + argv
|
| |
Signed-off-by: Niranjan M.R mrniranjan@redhat.com
Setting permissions to 600 sets the file permissions to "---x-wx--T."
causing the sshpass to not have permission to read the password file.
This patch sets the read write permissions in octal mode.