Ticket #344: cache_no_umask_needed.diff

File cache_no_umask_needed.diff, 0.7 kB (added by Nicolas, 1 year ago)

Patch to cache.inc to make it set correct permissions

  • html/inc/cache.inc

    old new  
    1111// mechanism for caching commonly-accessed pages 
    1212 
    1313function make_cache_dirs() { 
    14     if (!@filemtime("../cache")) mkdir("../cache", 0770); 
     14    if (!@filemtime("../cache")) { 
     15        mkdir("../cache", 0770); 
     16        chmod("../cache", 0770); 
     17    } 
    1518    for ($i=0;$i<256;$i++) { 
    1619        $j=sprintf("%02x",$i); 
    1720        if (!@filemtime("../cache/$j")) { 
    1821            mkdir("../cache/$j", 0770); 
     22            chmod("../cache/$j", 0770); 
    1923        } 
    2024    } 
    2125} 

If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.