mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Fix umask calculation on file creation. Fixes #10257
This commit is contained in:
@@ -1391,7 +1391,7 @@ class AnsibleModule(object):
|
|||||||
# based on the current value of umask
|
# based on the current value of umask
|
||||||
umask = os.umask(0)
|
umask = os.umask(0)
|
||||||
os.umask(umask)
|
os.umask(umask)
|
||||||
os.chmod(dest, 0666 ^ umask)
|
os.chmod(dest, 0666 & ~umask)
|
||||||
if switched_user:
|
if switched_user:
|
||||||
os.chown(dest, os.getuid(), os.getgid())
|
os.chown(dest, os.getuid(), os.getgid())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user