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


10

Apologies for the inconvenience! Should be fixed ASAP! But until it's fixed, yet another solution to this is to execute: $ echo "#includedir /etc/sudoers.d" | sudo tee -a /etc/sudoers in a terminal tab, and restarting all terminal sessions, by right-clicking inside a terminal and choosing Restart All Terminal Sessions. Then, try executing the apache50 ...


6

UPDATE 24-Dec-2016: As of IDE version 94, this has been fixed. Suspect some cloud9 change. For the "more comfortable", a patch is needed in apache50 script. You need elevated permissions. (I used sudo vi /usr/bin/apache50) change line 21 in /usr/bin/apache50 from apache="sudo -S -u www-data service apache2" to apache="sudo sudo -S -u www-data service ...


4

The root cause is a Cloud9 change, github bug to track here: https://github.com/cs50/ide50/issues/27 DinoCoderSaurus's workaround should work until they update the cs50 ide. Also: you should learn to use vi! Simple steps for this case: $ sudo vi /usr/bin/apache50 press 'i' to enter Insert mode make your changes (using the arrow keys to navigate) press ...


3

The bug is in the declaration of the flask function in /etc/profile.d/ide50.sh in IDE version 88. Since CS50x (edX 2016 version of CS50) does not use python, and flask is a python framework, you should be able to remove the function, start apache50, and roll merrily along. I tested on my system and was able to run pset6, pset7 and pset8. Here is a way to ...


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


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.


1

All you need is "update50" then be happy! :)


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

THIS IS MORE A COMMENT THAN AN ANSWER BUT I DON'T HAVE SPACE IN A COMMENT TO SAY ALL THIS I looked at the three files mentioned on the error: /etc/init.d/apache2 /etc/profile.d/ide50.sh /etc/apache2/envvars Let us call them apache2, ide50.sh, and envvars for simplicity. I have no idea what the 71 is. Because apache2's 71st line has nothing and ide50.sh ...


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


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