i.php - error CHMOD

Could anyone please help me with the following error?

This error comes from our server error log file. There are lines and lines of the same error.
******************************
[Tue Jan 19 12:19:09 2010] [error] [client 80.101.107.186] PHP Warning: chmod() [function.chmod]: Operation not permitted in /var/www/vhosts/mywebiste.com/httpdocs/zen/zp-core/i.php on line 113, referer: http://www.mywebsite.com/zen/john doe/New Scotland/JohnDoe_image1.jpg.php

[Tue Jan 19 12:19:09 2010] [error] [client 80.101.107.186] PHP Warning: chmod() [function.chmod]: Operation not permitted in /var/www/vhosts/mywebiste.com/httpdocs/zen/zp-core/i.php on line 113, referer: http://www.mywebsite.com/zen/john doe/New Scotland/JohnDoe_image2.jpg.php

and the lines keep going and going...
******************************

Apparently the issue in the i.php file on line 113:

// Make the directories for the albums in the cache, recursively.
// Skip this for safe_mode, where we can't write to directories we create!
if (!ini_get("safe_mode")) {
$albumdirs = getAlbumArray($album, true);
foreach($albumdirs as $dir) {
$dir = SERVERCACHE . '/' . $dir;
if (!is_dir($dir)) {
@mkdir($dir, CHMOD_VALUE);
chmod($dir, CHMOD_VALUE);
} else if (!is_writable($dir)) {
chmod($dir, CHMOD_VALUE); //this is line 113
}
}
}

PHP support - safe mode is off.

Could anyone please point me in a direction how to fix this?

Thank you very much in advance.

Comments

  • The error message is telling you that your site is not permitting Zenphoto to use the chmod() function. Zenphoto uses this function extensively to insure that folders and files it creates have the proper set of permissions.

    You would have to ask your server personnell why this is not permitted. Zenphoto does it only on files and folders it is supposed to be the owner of. Most likely your site has some strange paranoia and rather than disabling threatening use of these functions they have taken the "shortcut" of restricting all use. This is much like a bank realizing that a person who walks in the door might be a bank robber and taking the precaution of not letting any one in.
  • sbillard, thank you very much. this has been extremely helpful!
Sign In or Register to comment.