[csw-devel] SF.net SVN: gar:[20960] csw/mgar/gar/v2/lib/web/releases_web.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Fri May 3 15:18:21 CEST 2013
Revision: 20960
http://gar.svn.sourceforge.net/gar/?rev=20960&view=rev
Author: wahwah
Date: 2013-05-03 13:18:21 +0000 (Fri, 03 May 2013)
Log Message:
-----------
releases-web: Uploaded files have to be 0644
tempfile.mkstemp creates wiles with mode 0600 by default, but these files must
be world readable when in the catalog.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/web/releases_web.py
Modified: csw/mgar/gar/v2/lib/web/releases_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/releases_web.py 2013-05-03 13:16:53 UTC (rev 20959)
+++ csw/mgar/gar/v2/lib/web/releases_web.py 2013-05-03 13:18:21 UTC (rev 20960)
@@ -87,6 +87,8 @@
os.close(fd)
target_path = os.path.join(ALLPKGS_DIR, basename)
os.rename(tmp_filename, target_path)
+ # Since mkstemp creates files with mode 0600 by default:
+ os.chmod(target_path, 0644)
except sqlobject.main.SQLObjectNotFound, e:
messages.append("File %s not found in the db." % data_md5_sum)
else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list