From a5288f96b891926d64c9733a11b53f5d822bd714 Mon Sep 17 00:00:00 2001 From: Rene Luria Date: Thu, 26 Jun 2014 14:25:23 +0200 Subject: [PATCH] loosen perms for fpm --- php/modules/misc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php/modules/misc.php b/php/modules/misc.php index 2b5afb3..5cf4428 100755 --- a/php/modules/misc.php +++ b/php/modules/misc.php @@ -120,6 +120,9 @@ function get_hashed_password($password) { function hasPermissions($path, $permissions = '0777') { + /* assume that if running with the same uid as the owner of the directory it's ok */ + $stat = @stat($path); + if ($stat && ($stat['uid'] == getmyuid())) return true; if (substr(sprintf('%o', @fileperms($path)), -4)!=$permissions) return false; else return true; @@ -157,4 +160,4 @@ function fastimagecopyresampled(&$dst_image, $src_image, $dst_x, $dst_y, $src_x, } -?> \ No newline at end of file +?>