Answer the question
In order to leave comments, you need to log in
Problem with Apache user on linux and script being executed?
The folder has a makeit.php file with the contents:
A group for the file and for the folder containing the given file "vagrant" and the user "vagrant" which has full write, read and execute access.
When I execute on the command line:
/var/www/html/makeit.php
, a directory is created and everything works as it should.
If I try to run this file from a browser, I get an error:
"mkdir(): Permission denied .....".
Prior to this, the apache user and group were changed to "vagrant" c "www-data" and restarted the server.
What could be the problem - on the command line under the user "vagrant" everything works, and in the apache browser under the user and group "vagrant" it gives a write error.mkdir(__DIR__ . "/newdir");
If anything, on the command line the command "ps aux | egrep '(apache|httpd)'" says that the user is "vagrant".
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question