From 47065c2a43593fa37698103712a32698da952d9f Mon Sep 17 00:00:00 2001 From: Markus Juenemann Date: Tue, 16 Jun 2015 10:37:38 +1000 Subject: [PATCH] Removed check whether destination directory is writable from files/unarchive.py. This check will prevent extraction of an archive if the archive does not actually write to the destination directory but only writes to any writable sub-directories of it. The underlying tar command will report errors should it try to write to read-only directories. --- lib/ansible/modules/files/unarchive.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/ansible/modules/files/unarchive.py b/lib/ansible/modules/files/unarchive.py index 2b373a8e7fb..ac35ea58d88 100644 --- a/lib/ansible/modules/files/unarchive.py +++ b/lib/ansible/modules/files/unarchive.py @@ -310,8 +310,6 @@ def main(): # is dest OK to receive tar file? if not os.path.isdir(dest): module.fail_json(msg="Destination '%s' is not a directory" % dest) - if not os.access(dest, os.W_OK): - module.fail_json(msg="Destination '%s' not writable" % dest) handler = pick_handler(src, dest, module)