Answer the question
In order to leave comments, you need to log in
PHP: Permission denied when disabling shh client?
This is the situation:
Apache and PHP are installed on Ubuntu 13.10, the root folder of Apache is default: /var/www
Also, a game server is installed on the server that writes logs to the server.log file, which is located in /home/user/<long path to the file >/ (I think the key is that it's in your home directory).
The www folder contains api.php that reads this log file and parses it into values. The problem is that if I connect to the server via ssh, then the script runs fine, but as soon as I disconnect, an error occurs
Warning: file_get_contents(/home/user/<длинный путь к файлу>/server.log): failed to open stream: Permission denied in /var/www/api.php on line 25
Answer the question
In order to leave comments, you need to log in
your script is run from the user under which Apache runs,
if my memory does not change my users' home directory in ubuntu, the rights are 700
, that is, no one except the owner can go there, in general, you need to give access
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question