Merge pull request #10518 from pilou-/file_mode_v2

Port #10258 to v2
pull/4420/head
Toshio Kuratomi 2015-03-22 19:56:03 -07:00
commit 7115d37933
1 changed files with 1 additions and 1 deletions

View File

@ -1376,7 +1376,7 @@ class AnsibleModule(object):
# based on the current value of umask
umask = os.umask(0)
os.umask(umask)
os.chmod(dest, 0666 ^ umask)
os.chmod(dest, 0666 & ~umask)
if switched_user:
os.chown(dest, os.getuid(), os.getgid())