ZenphotoCMS Forum
Force chmod 777 in cache directory - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Force chmod 777 in cache directory (/thread-1118.html)



Force chmod 777 in cache directory - idumaire - 2007-02-02

Some provider don't allox user to change directory mod !

I propose to add in classes.php in Album function, line 436

` // Second defense against reverse folder traversal:

if(!file_exists($this->localpath) || strpos($this->localpath, '..') !== FALSE) {

  $this->exists = false;

  return false;

}

if( ! is_writable($this->localpath) ) { chmod($this->localpath, 777); }

$new = parent:ersistentObject('albums', array('folder' => $this->name));`



Force chmod 777 in cache directory - trisweb - 2007-02-02

That could work, true, but it might not because often the Apache server process isn't allowed to chmod either. However, in most environments, it can work, so it's good to do. Thanks for the patch!