Fatal error: Uncaught Runtime Exception on webserver

Hi,

I have trouble getting my gravsite to work on a clients webserver. Full error:

Fatal error: Uncaught exception ‘RuntimeException’ with message ‘Opening file for writing failed on error fopen(/public/sites/www.bouwbedrijfzeeland.com/cache//compiled/files/690b9e78600e42360f761a216e565335.yaml.php): failed to open stream: Permission denied’ in /public/sites/www.bouwbedrijfzeeland.com/vendor/rockettheme/toolbox/File/src/File.php:202 Stack trace: #0 /public/sites/www.bouwbedrijfzeeland.com/vendor/rockettheme/toolbox/File/src/File.php(320): RocketTheme\Toolbox\File\File->lock() #1 /public/sites/www.bouwbedrijfzeeland.com/vendor/rockettheme/toolbox/File/src/PhpFile.php(31): RocketTheme\Toolbox\File\File->save(Array) #2 /public/sites/www.bouwbedrijfzeeland.com/system/src/Grav/Common/File/CompiledFile.php(67): RocketTheme\Toolbox\File\PhpFile->save(Array) #3 /public/sites/www.bouwbedrijfzeeland.com/system/src/Grav/Common/Config/Setup.php(178): Grav\Common\File\CompiledYamlFile->content() #4 /public/sites/www.bouwbedrijfzeeland.com/system/src/Grav/Common/Processors/SiteSetupProcessor.php(18): Grav\Common\Conf in

I am really stuck and don’t know how to fix it. Please help :slight_smile:

/public/sites/www.bouwbedrijfzeeland.com/system/src/Grav/Common/File/CompiledFile.php on line 83

Hi
I ran into an error like this for the first time a couple of days ago. Basically I think Grav can’t write to the folders it uses - if you could get the site to load you’d get errors about which folder(s) it can’t write to - in my case it was down to permissions between the file owner and apache. There are are some tips on the learn site here: https://learn.getgrav.org/troubleshooting/permissions

Thanks for your reply!

Alright I get that, but honestly I am kinda new to webdevelopment and I don’t really understand the documentation :confused: for example where should I run the given commands? Feeling kinda embarrassed right now

If it is just file permissions you’d probably be best off talking to their hosting provider / IT guy as its not something specific to Grav they can probably sort you out in a couple of seconds.

Otherwise what’s the OS and webserver?

I contacted the hosting provider and they are working on it, guess it will be alright. Thanks for your help!