mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix umask calculation on file creation. Fixes #10257
This commit is contained in:
parent
6a29251292
commit
6caeded74e
1 changed files with 1 additions and 1 deletions
|
@ -1391,7 +1391,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())
|
||||
|
||||
|
|
Loading…
Reference in a new issue