Hot answers tagged

23

CS50 course materials will tell you that the permissions need to be set as follows: chmod 711 for directories chmod 644 for images, HTML, CSS, JavaScript 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 ...


2

This guy had a solution. Not sure how good it is in security aspects though. https://m.reddit.com/r/cs50/comments/5055ti/403_forbidden_permissions_chmod_the_definitive/ cd ~/workspace/pset7 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/...


1

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 ...


1

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 ...


1

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 ...


1

INDEXES :( 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: RETURN VALUE On success (all requested permissions granted, or mode is F_OK and the ...


Only top voted, non community-wiki answers of a minimum length are eligible