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


15

I found that deleted post over on reddit with an answer from delipity. But the user continued to have problems. I unzipped a fresh pset7, and did these chmods and finally got RockRolld! (oops. Spoiler :). I then removed pset7 and reinstalled, then followed this list and got the same (positive) result. I am running IDE 62. Full disclosure, I did not reinstall ...


13

This is the same solution as posted in Reddit, simply with clean code ready for copy/paste to terminal. Please note that you have to start in "workspace" directory. chmod 711 pset7 cd pset7 chmod 755 public cd public chmod 711 css fonts img js chmod 644 css/* fonts/* img/* js/* cd .. chmod 711 includes vendor views chmod 644 includes/* ...


8

Due to a recent update the permissions required has changed, but the specifications has not been updated. All PHP files and config.json must now be set to chmod 644, whilst all directories must be set to chmod 711. If that did not solve your problem, here are some threads that might. https://www.reddit.com/r/cs50/comments/5055ti/...


2

Official answer: the CS50 team is aware of all the issues we've noted and more. Version 60 will be coming out in the next few days, and it should take care of things.


2

That is the mode required to access a file with apache50 server. You will need to chmod 644 the html file, or any file, to get rid of the "403 Forbidden" error.


1

@DinoCoderSaurus is right. See also 403 Forbidden / permissions / chmod -- the definitive guide on the CS50 Reddit, for details on the minimum required permissions for different types of file. TL;DR: It's 711 for directories (unless you want Apache2 to generate a dynamic index when there is no index.html or index.php provided, then it's 755). It's 644 for ...


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