first fixes for webhosting

This commit is contained in:
Patrick Neumann 2018-11-16 15:06:39 +01:00
parent 54bfc7fbbb
commit ce6ee27936
2 changed files with 4 additions and 4 deletions

1
faccess.log Normal file
View File

@ -0,0 +1 @@
123.123.123.123 - - [01/Jan/1970:00:00:00 +0000] "GET / HTTP/1.1" 200 123 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0"

View File

@ -69,12 +69,11 @@ $line .= "\"";
$line .= "\n";
// prepare error message
$user = shell_exec( "whoami" );
$emsg = "The webserver has no permissions to read and/or write $file.<br>";
$emsg .= "How to fix it:<br>";
$emsg .= "~# touch $file<br>";
$emsg .= "~# chown $user $file<br>";
$emsg .= "~# chmod 644 $file";
$emsg .= "1. also copy faccess.log into same directory";
$emsg .= "2. ~# chown www-data $file<br>";
$emsg .= "3. ~# chmod 644 $file";
// delete oldest log line if max is reached
if( $log = file( $file ) ) {