Permissions issues when deploying (NearlyFreeSpeech)

Built a local site and haven’t run into any issues, but I can’t access the panel after it’s been deployed.

I’m using rsync to deploy and have chmoded all dirs to 755 and files to 644. I’ve also tried removing /media/panel, all to no avail. I even set permissions to 777 for all files and directories including the public directory just to see if that helped, and nothing!

There seems to be specific things you must do when deploying Kirby, but they don’t seem to be documented anywhere, or be part of any of the guides I’ve read. Am I missing something?

This is the message I see in spite of all my best efforts:

The panel assets cannot be installed properly. Please check permissions of your media folder.

Welcome :slight_smile:

When you ran rSync are you sure you used the correct SSH account?

Who owns the folders/files? They must be owned by the Apache user.

I did, there’s only one provided by my host.

They’re owned by my user, and of my user’s group. But if all directories and files are set to 777 (as I did for testing) I can’t imagine this would be an issue. The PHP or Apache user has access to anything 777.

But is the media folder created at all? And if so, with what rights?

The media directory is there, and has permissions of 755 (it also didn’t work when it had 777, as I mentioned above)

The first thing i did when first started using rSync was mangle the ownership of the “public_html” folder in the server that all those files are sitting so setting those perms / owner wont make a difference.

Just for reference heres the command i use to deploy with rSync:

rsync -azLK --force --delete --progress --exclude-from=rsync_exclude.txt -e "ssh -p22" ./public/ user@123.456.789.10:/var/www/yoursite/public_html

Which will sync a local folder called public up to the server. Amend the paths obviously :slight_smile:

Okay I’ve changed all directories and files over to the “web” group (which is what Apache uses) and I’ve set all directories to 755 and files to 644, and I still get the The panel assets cannot be installed properly. Please check permissions of your media folder. error.

I’ve also deleted the media folder and site/cache and I tried all the same above with a fresh Kirby install.

Okay it looks like this host is very strict with what files can be written to by scripts. This has actually already been discussed on this forum before, here’s the relevant FAQ entry from NearlyFreeSpeech.

So, @texnixe it looks like most files will be owned by my user, and I’ll have to grant write access to a select set of files and folders that Kirby will need to edit via PHP script. Is there a list of what these files / folder might be?

  • The /content folder and its subfolders
  • The /media folder and its subfolders
  • The /site/sessions folder
  • The /site/accounts folder
  • The /site/cache folder
  • Any files/folders that you write through some script/plugin and are outside the mentioned folders
1 Like