6

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. In my experience, you'll need a minimum of chmod 711 for directories, chmod 640 for PHP files and config.json, and chmod 644 for HTML, CSS, JavaScript, images and font files. Open a Terminal tab ...


4

403 Forbidden / permissions / chmod: the Definitive Guide TL;DR: PHP files and config.json need to be set to chmod 640 despite what it says in the Problem Specification. Hope this helps!


3

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


2

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. '#!/bin/bash find . -type d | xargs chmod 711 find . -name *.php | xargs chmod 640 find . -...


1

To start flask, the command is flask run. 644 removes execute permission, which is needed for cd. Access control 720 should work for pset7 and finance directories.


1

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


1

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


1

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


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


1

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


1

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


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