diff --git a/checkin_notes b/checkin_notes index 5409e56309..f9f33f9c4a 100644 --- a/checkin_notes +++ b/checkin_notes @@ -12438,3 +12438,11 @@ David 21 Dec 2007 boinc_api.C sched/ delete_file.C + +David 21 Dec 2007 + - user web: when creating cache dir, chmod() so that + protections are right regardless of umask. + From Nicolas Alvarez; fixes #344 + + html/inc/ + cache.inc diff --git a/html/inc/cache.inc b/html/inc/cache.inc index f431d511ef..1c55a8c8f9 100644 --- a/html/inc/cache.inc +++ b/html/inc/cache.inc @@ -11,11 +11,15 @@ if (function_exists("apache_request_headers")) { // mechanism for caching commonly-accessed pages function make_cache_dirs() { - if (!@filemtime("../cache")) mkdir("../cache", 0770); + if (!@filemtime("../cache")) { + mkdir("../cache", 0770); + chmod("../cache", 0770); + } for ($i=0;$i<256;$i++) { $j=sprintf("%02x",$i); if (!@filemtime("../cache/$j")) { mkdir("../cache/$j", 0770); + chmod("../cache/$j", 0770); } } }