I faced strange problem wher ran Apache server and php7.1 script.
PHP doesn't have it's root folder write-access. It's necessary for my task to have those permission. I start httpd service on my system, then run my script, and it doesn't work because of lack of permissions. Where do i have to change those permissions?
This is for Linux Server running Apache2, PHP 7.1 here you can see my processes (sorry cannot attach photo) (php is running under apache user)
Also here .php shows where my root folder is (/var/www/html)
and here is my folder with permissions: drwsrwsrwt+ 3 apache apache 103 html
As you can see I even tried to give chmod 7777 to that folder /var/www/html, but it still didn't work!
Then, i desided to recursively add permissions to root folder (/var/www).
i used .php testfile to check what user runs apache and also to chek root directory of script
echo `whoami`;
echo getcwd() . "\n";
$filename = '/var/www';
if (is_writable($filename)) {
echo 'folder /var/www is ready to be written' . "\n";
} else {
echo '...cant be written';
};
I have that output:
apache /var/www/html folder /var/www/html not ready
another check of write permissions in another script (not mine) tells the same
I really stuck with that, please, help)
Thank you in advance!