Skip to content

Commit

Permalink
bug fixed: it seems that the upload file.jpg had -rw------- permissions
Browse files Browse the repository at this point in the history
which is not enough if the http server user is different from the file owner
(which is the case when suphp is running). The permissions are set to
-rw-r--r--.


git-svn-id: http://piwigo.org/svn/trunk@2511 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Sep 8, 2008
1 parent b5c5a2a commit fceb26e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/ws_functions.inc.php
Expand Up @@ -966,6 +966,7 @@ function ws_images_add($params, &$service)
$fh_file = fopen($file_path, 'w');
fwrite($fh_file, base64_decode($params['file_content']));
fclose($fh_file);
chmod($file_path, 0644);

// check dumped file md5sum against expected md5sum
$dumped_md5 = md5_file($file_path);
Expand Down Expand Up @@ -995,6 +996,7 @@ function ws_images_add($params, &$service)
$fh_thumbnail = fopen($thumbnail_path, 'w');
fwrite($fh_thumbnail, base64_decode($params['thumbnail_content']));
fclose($fh_thumbnail);
chmod($thumbnail_path, 0644);

// check dumped thumbnail md5
$dumped_md5 = md5_file($thumbnail_path);
Expand Down

0 comments on commit fceb26e

Please sign in to comment.