403 Forbidden, Error 500 (etc)! Permissions issues?

Tagged:

Faulty permissions can cause lots of trouble!

If permissions are set too low, you will get 403 Forbidden errors when loading pages; if they're set too high, an attacker may be able to rewrite anything on your site at will. To fix permissions on your account, SSH into HCS and enter these commands

chmod 711 ~ #Fixes perms on your home directory
chmod 711 ~/web/ #Fixes perms on your web directory
chmod -R ugo+r ~/web/ #Sets read bit for everyone on everything in web directory
chmod -R go-w ~/web/ #Prevents others from writing anywhere your web directory
chmod -R u+w ~/web/ #Allows you to write to anything in your web directory

This should prevent others from writing to your files, although insecure PHP code can still be used to hose your website with spam. But for now, if you're new to PHP and Ruby on Rails, try to only use well-maintained and well-known packages like Wordpress or Drupal, follow their instructions carefully, and keep your code up-to-date.