I had a working site on Sitevalley's shared hosting environment but it was slow. So I had them migrate the site to a virtual server for me. I expected that the entire SS site wold be migrated.
Alas when I run the site now I get this error
Warning: fopen(/home/liveinsp/domains/liveinspiredjourney.org/public_html/silverstripe-cache/manifest-main) [function.fopen]: failed to open stream: Permission denied in /home/liveinsp/domains/liveinspiredjourney.org/public_html/sapphire/core/ManifestBuilder.php on line 112
Fatal error: Cannot write manifest file! Check permissions of /home/liveinsp/domains/liveinspiredjourney.org/public_html/silverstripe-cache/manifest-main in /home/liveinsp/domains/liveinspiredjourney.org/public_html/sapphire/core/ManifestBuilder.php on line 116
I have looked at the manifest-main file and its permission is 755. I am no Linux person but that seems reasonable.
What else should I be looking at? At the moment the site is dead in the water.
OK I think I fixed it but I hope I didn't use a sledgehammer to crack a walnut!
I set the permissions on the silverstripe-cache folder and all folders and files below that to 777 to owner, group and public. That seemed to fix the problem but I hope I haven't opened up some backdoor or something
I think a better way would be to delete the silverstripe-cache directory, re-create it as a normal user and then make the web server user the owner. This way you don't have to do any chmod of files, and it's probably more secure.
Not sure what your web server user is, but common examples are www-data, http and _www. You can probably find it out by using top and checking the http processes to see the user they're running as. You could probably check the phpinfo() output and seeing who the user is from there.