diff --git a/roles/people/files/make-people-page.py b/roles/people/files/make-people-page.py index dcfe66f87b..07dcae7a1e 100644 --- a/roles/people/files/make-people-page.py +++ b/roles/people/files/make-people-page.py @@ -184,6 +184,7 @@ with open(out_file, 'w') as handle: out_file_uid = os.stat(out_file).st_uid # give write permissions to group -os.chmod(out_file, stat.S_IWGRP) +st = os.stat(out_file) +os.chmod(out_file, st.st_mode | stat.S_IWGRP) # chown out file to group os.chown(out_file, out_file_uid, out_file_grp)