aboutsummaryrefslogtreecommitdiffstats
path: root/include/ws_functions.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2008-09-08 21:14:33 +0000
committerplegall <plg@piwigo.org>2008-09-08 21:14:33 +0000
commitfceb26e23175ff93988091a05c80443a39b9d865 (patch)
treee6699cfa83139cdb4fb687c195c4ae4c0699f8ff /include/ws_functions.inc.php
parentb5c5a2aeae0f771da8b04ba29f2cc1b8ec0fe4ae (diff)
bug fixed: it seems that the upload file.jpg had -rw------- permissions
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
Diffstat (limited to '')
-rw-r--r--include/ws_functions.inc.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index d99b901bd..0a0b7189d 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -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);
@@ -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);