werch Posted September 14, 2017 Posted September 14, 2017 Hi, I tried to follow the Hello Worlds tutorial, but I'm stuck at the step after I have created the Earth page using the Planet template. When trying to view the Earth page I get a blank page, or with PHP debug on, I see the following error message: "Warning: file_put_contents(/opt/bitnami/apps/processwire/htdocs/site/assets/cache/FileCompiler/site/templates/_init.php): failed to open stream: Permission denied in /opt/bitnami/apps/processwire/htdocs/wire/core/FileCompiler.php on line 389" The admin interface itself works. Some permissions that I need to change? Cheers, Chris
abdus Posted September 15, 2017 Posted September 15, 2017 You need to set 755 660 for files and 660 755 for directories. This should help: https://processwire.com/docs/security/file-permissions/#how-to-change-permissions-of-existing-files
werch Posted September 15, 2017 Author Posted September 15, 2017 Thank you Are you sure it's not 775 for directories and 660 for files? I tried the opposite as you suggested, but that didn't work. Then tried the above and it works. Not sure it's the strictest possible setting, but this is not running on a shared machine.. OK as long as I don't have anything world writable? Best. Christ
abdus Posted September 15, 2017 Posted September 15, 2017 You're right, it should be like you said, I mixed those up. Glad you've solved your problem
SamC Posted September 20, 2017 Posted September 20, 2017 Maybe you can lockdown further in terms of permissions. I use: Directories: 755 Files: 644 .htaccess: 444 config.php: 444 Works for me. Whether it makes any difference is another story, I've just always done it like this. https://processwire.com/docs/security/file-permissions/#potential-permissions-for-writable-directories-and-files
SamC Posted September 21, 2017 Posted September 21, 2017 @werch I had to repost here because after reading this: https://processwire.com/docs/security/file-permissions/#potential-permissions-for-site-config.php ...it seems 444 is not actually enough either. 400 or 440 seems the way to go.
SamC Posted September 29, 2017 Posted September 29, 2017 I just tried the following, I created a file 'chmod.php': <?php chmod(".htaccess", 0644); // nothing lower would work here chmod("site/config.php", 0400); // this seems ok echo 'Completed' ?> ...uploaded it into my root via filezilla, went to mysite.com/chmod.php. Back to filezilla, deleted the file. site/config.php is now 400. .htaccess is now 644 (nothing lower than this would work in my environment).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now