среда, 20 мая 2015 г.

PHP uploads permission

Ubuntu 14.04
$upload_dir = $_SERVER['DOCUMENT_ROOT'] . "/site/uploads/";
Who is Apache process owner:
echo exec('whoami');
In my case it's www-data,  then change the owner of the destination directory:
chown www-dataupload_dir
and set permission:
chmod 755 upload_dir

Комментариев нет:

Отправить комментарий