Permissions Issues

We’ve all had it; you put a website on the server and are hit with odd issues which, after much toil and trouble, come down to being all about file permissions. Recently, after putting a Rails application on to a server, I started getting the following error

ActionView::Template::Error (No such file or directory - Asset file not found at '/public/stylesheets/screen.css')

How odd, I thought; the file is there. Some rooting about uncovered the problem; for some reason this error is returned when assets (such as stylesheets or javascript files) have incorrect permissions. Changing the permissions on all the javascript and stylesheet files using chmod solved the issue (though you could use your FTP client of choice to the same end).