I had left pset8 for a bit, and came back to it now. When I try to visit this link: https://ide50-myusername.cs50.io/articles.php?geo=Cambridge,+Massachusetts, I get the following warning and error:

Warning: file_get_contents(/home/ubuntu/workspace/pset8/includes/../config.json): failed to open stream: Permission denied in /home/ubuntu/workspace/pset8/vendor/library50-php-5/CS50/CS50.php on line 95

Fatal error: Could not read /home/ubuntu/workspace/pset8/includes/../config.json in /home/ubuntu/workspace/pset8/vendor/library50-php-5/CS50/CS50.php on line 98

I have looked at a number of threads on here, and I tried a bunch of solutions proposed here Pset8 search.php permission issues, warnings & fatal error - fail to open CS50.php but I am not getting anywhere with them. (All of this is weird especially given that things worked fine last week.)

Some advice on how to fix this will be much appreciated, I really hate getting stuck on stuff like this :(

1 Answer 1


The short answer is:

ls -l ~/workspace/pset7/config.json

You should see something like this:

~/workspace/ $ ls -l ~/workspace/pset7/config.json 
-rw-rw---- 1 ubuntu ubuntu 155 Jul 26 23:47 /home/ubuntu/workspace/pset7/config.json

If the permissions are anything other than -rw-r-----, you can fix this with the following command:

chmod 640 ~/workspace/pset7/config.json

If that doesn't work (and, honestly, even if it does!) the longer and more comprehensive answer is in my Definitive Guide to 403 Forbidden, permissions, and chmod on the CS50 Reddit.

By the way, if this advice gets you up and running, be sure to let me know by clicking the green check mark to accept my answer. By doing so, you will prevent this from becoming a Zombie Question that haunts the forum forever.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .