[Mailman-Developers] [NEWBIE] ... Help! File permission error

Harald Meland Harald.Meland@usit.uio.no
02 Jun 1999 18:40:42 +0200


--=-=-=

[Feisal Umar]

> Hi. {This problem was actually posted at mailman-users lists, but I didn't
> get any responses .. so I think I'll try here :) }

Sure -- I'm trying to catch up with mailman-users, but unfortunately
I'm still pretty far behind...

> Whenever I am trying to access my public archive, I get an error message ..
> the normal "denied access error". A quick file permission check shows that
> the *.txt.gz file has a chmod 600 permission (hence denied access).

Small oversight in the archiving code, I believe.  Please try this
patch:


--=-=-=
Content-Disposition: attachment
Content-Description: Patch to create gzipped text archives with correct mode

Index: HyperArch.py
===================================================================
RCS file: /export/public/cvsroot/mailman/Mailman/Archiver/HyperArch.py,v
retrieving revision 1.13
diff -u -r1.13 HyperArch.py
--- HyperArch.py	1998/11/22 02:06:09	1.13
+++ HyperArch.py	1999/06/02 16:31:32
@@ -884,7 +884,11 @@
                         archz = gzip.open(oldgzip)
                     except (IOError, RuntimeError, os.error):
                         pass
-                    newz = gzip.open(gzipfile, 'w') 
+                    try:
+                        ou = os.umask(002)
+                        newz = gzip.open(gzipfile, 'w')
+                    finally:
+                        os.umask(ou)
 		    if archz :
                         newz.write(archz.read())
                         archz.close()

--=-=-=


If this fixes your problem, let me know, and I'll commit the change.
-- 
Harald

--=-=-=--