V
V
Vladislav Onishchenko2013-12-17 15:08:32
linux
Vladislav Onishchenko, 2013-12-17 15:08:32

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

Apache and php did not set up (I don't know how :c ), please take this into account. Thank you.
PS I just checked, Dynmap (plugin for MK server) is not loading either, writes 404.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuriy Andamasov, 2013-12-17
@STFBEE

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 question

Ask a Question

731 491 924 answers to any question