According to this post on the CS50 Reddit, the permissions have changed since a recent update50, and the documentation has not been updated to reflect the changes.
Open a Terminal tab ...
@Vitale: I feel your pain! Permission errors can be really frustrating. You are impatient to get back to work, and in your haste, you reach for chmod -R 777 *, the biggest sledgehammer in your toolkit.
It probably feels like you have solved your problem, because the permission errors have gone away. Now you can get back to work!
But chmod -R 777 * is never ...
Based on the above from Matt Obert, I created the following bash script - bashPermsv2.sh - in the pset8 folder. Ran it from the terminal with:
'~/workspace/pset8/ $ sh bashPermsv2.sh'
and it resolved the Forbidden problem. My first use of a bash script.
find . -type d | xargs chmod 711
find . -name *.php | xargs chmod 640
find . -...
The lines referenced by the error messages appear to be in the area of CS50.php where it is looking up the configuration file. Make sure the permissions on pset8/includes/config.php pset8/config.json are 644 (as in chmod 644 config.json).
I know of no way to "undo" or roll back a permission change, but you can always change the permissions to whatever you want, using the same command and a different 3-digit number.
By changing it to 600, you locked it out to other people and systems. The first digit, the 6, is your, the owner, permissions. The second is group permission and the third digit ...
There is a way to reset the IDE without fixing the PHP interpreter.
You can create a new workspace. Go to https://cs50.io/sharmapranjal and click on the big gray square that says "+ Create a new workspace".
In the screen that follows, you will be prompted to "Choose a template ..."
Be sure to select the last one in the list: "Harvard's CS50".
Then start ...
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/...
If your website presents ("is stuck in") pset7 after you start apache for pset8, do a ctrl-F5 in the browser, that will reload the correct website.
(author's note: after rereading the question I realized the above may be the real problem, however since I already typed the below.....:)
There seems to be a bug in /etc/profile.d/ide50.sh that is causing this ...
I'm on mobile and doing weekend fun stuff, so I haven't had a chance to test ide50 version 60 yet to see whether permission issues are resolved, and I can't do that now.
In general, you should be able to fix permission issues by carefully reading the PHP error messages in the browser, and the Apache log files under /home/ubuntu/lib/apache2/log/error.log (...