/site/accounts is not writable

Hi everyone,

after moving my Kirby installation to a new server the panel says

Kirby encountered the following issues during installation …

1. /site/accounts is not writable
2. The thumbs folder must be writable.
3. The content folder and all contained files and folders must be writable.
4. /assets/avatars is not writable

I tried to search for an answer and checked some of the things already mentioned in the forums. For example all file permissions are set to 775 already. mb-string is enabled. The FTP user has permission to write. Settings the permission of the &sites/accounts folder to 777 works but that shouldn’t be the solution here i guess :slight_smile:

I’m running the following versions:

  • PHP Version 7.1.6
  • Kirby Version 2.5.6

Could you help me please? Thanks.

Check the folder ABOVE all of these. as in mysitefolder/site/accounts is writable.

if mysitefolder is not writable, neither will site or accounts be even if those folders are set.

In other words, every folder in the full path must be writable.

Check also the user:group settings are correct (i think this might be the case here because the folder may have your username when they were created but apache/php etc run under a different user account and therefore don’t have permission). You may have to check with your webhost what that correct user:group should be but heres a guide.

mysitefolder is probably really called public_html or www or public

Here is an example bash script I run after deploying Kirby

#!/bin/sh
DIRS="assets content kirby panel site thumbs"
FILES="index.php"

for dir in $DIRS;do
 sudo chown -R www-data.www-data "$dir"
 find "$dir" -type d -print0 | xargs -0r sudo chmod 775
 find "$dir" -type f -print0 | xargs -0r sudo chmod 664
 find "$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;

(note that there are some files missing in the files list because they are not relevant to my setup)

You would have to adapt the file owner for your environment.

When I used to deploy with git, I used this as a post-commit/post-merge hook