diff --git a/faccess.log b/faccess.log new file mode 100644 index 0000000..174bf2d --- /dev/null +++ b/faccess.log @@ -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" diff --git a/index.php b/index.php index 973e64e..956d338 100644 --- a/index.php +++ b/index.php @@ -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.
"; $emsg .= "How to fix it:
"; -$emsg .= "~# touch $file
"; -$emsg .= "~# chown $user $file
"; -$emsg .= "~# chmod 644 $file"; +$emsg .= "1. also copy faccess.log into same directory"; +$emsg .= "2. ~# chown www-data $file
"; +$emsg .= "3. ~# chmod 644 $file"; // delete oldest log line if max is reached if( $log = file( $file ) ) {