AWS linux Kirby permissions

Hi there,

I’ve had a search around but can’t seem to find a fix for this… I’m uploading a working local Kirby instance to my AWS linux server via SFTP (folder permissions at 775, files at 664).

All pages display fine with no errors, but trying to access the admin panel gives me the attached errors (which I assume is due to Kirby’s permissions on its folders/files).

Any ideas on how I can fix this? Perhaps I’m doing something stupid, I’m at a loss at how to crack it. Any help would be greatly appreciated!


First of all, it seems that the Panel hasn’t been installed yet or if so, that you haven’t uploaded the user accounts. Please check if there is a /site/accounts folder.

To install the Panel on a remote server (and create a first user), you have to allow that via your config.php

c::set('panel.install', true);

Please make sure to remove that line again once the Panel is installed.

Kirby does not set any permissions, it’s a server thing. Have you checked the folder permissions on the remote server? If the permissions are ok, then you probably also have to modify the owner of the files (usually, should be something like www-data).

Thanks for the help texnixe, I was transferring account details via SFTP, once the permissions are correct all errors seem to go away and everything works fine.

As you’ve mentioned it’s definitely a server side problem, my current workaround after uploading via SFTP (where I think the group settings are reassigned wrongly to ‘ec2-user’, where they should be the group ‘apache’) is to SSH into my server and reset overall permissions like this:

sudo chown -R ec2-user:apache /var/www

…But that’s a nightmare to do every time! I’ll keep searching for a solution, any other ideas welcome!

I usually check out with git during development and have a hook that takes care of setting the correct permissions. Guess you could automate this via a cron job or something like this.

Nice, I’ll give that a go, many thanks. I’ll also follow up with AWS and come back if I find a remedy for the above.

Alternatively if you deployed using rsync instead of SFTP, your local permissions (which I assume are set correctly) should be carried over. Something like this will do it.

Tip: If your using NPM, you can kick this off via NPM Scripts in you package.json.