CS50 course materials will tell you that the permissions need to be set as follows:
chmod 711 for directories
chmod 600 for PHP files.
In general, this is the correct advice.
However, if you have run update50 recently, you should know that there is a bug requiring chmod 640 instead for PHP files.
I've posted this ...
This guy had a solution. Not sure how good it is in security aspects though.
find . -type d | xargs chmod 711
find . -name *.php | xargs chmod 640
chmod 640 config.json
find . -name *.js | xargs chmod 644
chmod 644 public/css/*
chmod 644 public/...
First of all, let's look at the error message from the Apache2 logs:
(13)Permission denied: [client 10.240.1.18:34742] AH00035: access to / denied (filesystem path '/home/ubuntu/workspace/pset7/public') because search permissions are missing on a component of the path
What this means is that one or more of the parent directories on your full path to the ...
Your document root should be public. Path should be /home/ubuntu/workspace/pset6/public. You should call server as ./server public (assuming current working directory is ~/workspace/pset6). The reason server (the program) will run with server the argument (i.e. ./server server) is because the start() function only ensures the argument has execute ...
Hint: This line in indexes if (access(phpcheck, F_OK)) (and the other access) is wrong.
Suggestion: Read man access. Pay special attention to the RETURN section. access returns an int. Treat it like an int.
Hint: The pattern of errors from check50 makes load() the likely culprit.
Suggestion: Since the browser is giving "acceptable" output, look for ...
:( Requesting /test/ outputs /test/index.html
:( Requesting> directory containing index.php outputs index.php
\ expected> output, but not "HTTP/1.1 403 Forbidden\r\nContent-Type:..."
(And all your 403 problems)
According to man access:
On success (all requested permissions granted, or mode is F_OK and the ...