PHP is owner of image directory with "permissions 660."
Why can't PHP write to it? (a "permission denied" error is generated.)
But if I allow execute permission ("760") then it works.
Why??
My script is:
$imagePath = '../imageDirectory/'.gif';
$image = imagecreatefromstring(base64_decode($raw_image_data));
$rotate = imagerotate($image,-90,0);
imagegif($rotate,'../imageDirectory/'.gif');
Is it because the imagerotate and imagegif functions need the execute requirements to be able to monkey with the image?
Thank you.
Sub question (maybe more important than the first question):
PHP is configured to run as "user = www-data" and "group = www-data"
I am also a member of the group "www-data."
For me to be able to read and delete files in that aforementioned imageDirectory, should the imageDirectory be chown www-data:www-data ?? or chown myself:www-data ??
(both styles work)
Thank you.