Force chmod 777 in cache directory

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::PersistentObject('albums', array('folder' => $this->name));`

Comments

  • trisweb Administrator
    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!
Sign In or Register to comment.