diff options
author | JesseEmond <emond.jesse@gmail.com> | 2016-09-21 14:38:05 -0400 |
---|---|---|
committer | René Moser <mail@renemoser.net> | 2016-09-21 20:38:05 +0200 |
commit | 1f741b69f48568976a314e4ea67035074f6bf051 (patch) | |
tree | 627c71fc06b2ad6ff773c74770707bd7cf3f22f8 | |
parent | c354c974e74d79589b5d08de0365f94aaa03b309 (diff) | |
download | ansible-modules-core-1f741b69f48568976a314e4ea67035074f6bf051.tar.gz |
Unarchive stop passing file mode to tar command (#4179)
Fixes #4063.
Tar does not use this parameter on extraction (-x) or diff (-d)(the
only two cases where it is passed in unarchive). It only uses it on
creation:
https://www.gnu.org/software/tar/manual/html_section/tar_33.html
Providing `unarchive` with a file mode of `0755` (octal) makes it pass
the argument `--mode 493` (493 = 0755 in decimal) to `tar`, which then
fails while verifying it (because it contains an invalid octal char
'9'). Not passing the parameter to tar solves the issue.
-rw-r--r-- | files/unarchive.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/files/unarchive.py b/files/unarchive.py index 95bfe362..0eb8e49e 100644 --- a/files/unarchive.py +++ b/files/unarchive.py @@ -621,8 +621,6 @@ class TgzArchive(object): cmd.append('--owner=' + quote(self.file_args['owner'])) if self.file_args['group']: cmd.append('--group=' + quote(self.file_args['group'])) - if self.file_args['mode']: - cmd.append('--mode=' + quote(self.file_args['mode'])) if self.module.params['keep_newer']: cmd.append('--keep-newer-files') if self.excludes: @@ -670,8 +668,6 @@ class TgzArchive(object): cmd.append('--owner=' + quote(self.file_args['owner'])) if self.file_args['group']: cmd.append('--group=' + quote(self.file_args['group'])) - if self.file_args['mode']: - cmd.append('--mode=' + quote(self.file_args['mode'])) if self.module.params['keep_newer']: cmd.append('--keep-newer-files') if self.excludes: |