Fixing site permissions

I’m getting this error, when I log into the Panel:

“The page is not writable”
“Please check the permissions for the content folder and all files.”

SOME of the pages are writable, and some not. I’ve attempted to set permissions based on info that I’ve found in the forum, but I just can’t seem to fix this.

I would give you login access to my Bitbucket account. Please contact me directly ( greg at elmnt dot com )

Thank you!

Have you made sure to apply the permissions “down the road”, i.e. including all subfolders?

Yes, I set permissions on all files and all folders, via the terminal.

edit:
I’m also starting to think there might be an issue with my Bitbucket deployment to my development server. I’ve been trying to troubleshoot this as well. Still haven’t been able to determine if that might be a factor.

Have you checked your owner and group as well. Usually, if you deploy a Git repo, you need a post deployment hook that changes the user/user group.

It’s pretty likely that’s my issue. But I don’t know how to do that (yet). I’m looking into it now…

I’m not too familiar with this, either.
I use a post-checkout/post-merge hook like this:

#!/bin/sh

TOPDIR=`git rev-parse --show-toplevel`
DIRS="assets content kirby panel site thumbs"
FILES=".htaccess index.php license.md readme.md"

for dir in $DIRS;do
 sudo chown -R www-data.www-data "$TOPDIR/$dir"
 find "$TOPDIR/$dir" -type d -print0 | xargs -0r sudo chmod 775
 find "$TOPDIR/$dir" -type f -print0 | xargs -0r sudo chmod 664
 find "$TOPDIR/$dir" -type f \( -name *.pl -o -name *.cgi \) -print0 | xargs -0r sudo chmod 775
done

for file in $FILES;do
 sudo chown www-data.www-data "$file"
 sudo chmod 664 "$file"
done

exit 0;

But it’s still strange that it the issue does not affect all pages but only a few.

1 Like

Thank you! My next dumb question, where does that go? I had a developer who set up the deployment for me, and is no longer available.

They sit in /.git/hooks/

1 Like

Have you ever sorted this out?

So sorry for the late replay. I was off this project shortly after. All worked out, thanks to your input. Thank you, as always!

Thanks for reporting back :slight_smile:.