| |
@@ -50,7 +50,13 @@
|
| |
dirname_refpath = os.path.dirname(refpath)
|
| |
if doref and not os.path.exists(dirname_refpath):
|
| |
log.info("Creating the directories for the refpath")
|
| |
- os.makedirs(dirname_refpath)
|
| |
+ # Set the umask to be more permissive so directories get group write
|
| |
+ # permissions. See https://pagure.io/releng/issue/8811#comment-629051
|
| |
+ oldumask = os.umask(0o0002)
|
| |
+ try:
|
| |
+ os.makedirs(dirname_refpath)
|
| |
+ finally:
|
| |
+ os.umask(oldumask)
|
| |
|
| |
if doref:
|
| |
log.info('Writing %s to %s' % (commitid, refpath))
|
| |
We need to set the umask to be more permissive so directories get group write
permissions. See https://pagure.io/releng/issue/8811#comment-629051.