No images - media folder is empty

I’m setting up my first Kirby site with Nginx. After some false starts setting up the server I think PHP is working, but images are not showing. The media directory is empty. Also when trying access the panel I get the error - site/sessions" is not writable.

So it looks like an ownership/permissions problem. From an earlier post on the forum, I tried

chmod -R www-data:www-data ./kirby-project

Which returned

chmod: invalid mode: ‘www-data:www-data’

You can see the phpinfo() here staging: username is kirby and pwd is cms

Thanks.
Andy

The command for changing file ownership (which is what you are trying to do with www:data as argument) is chown not chmod.

chmod sets read/write/execute permissions and expects for example 755/644

Check ownership and permissions with ls -la

worked and now the images are displaying, thanks.

Now it shows as

drwxrwxr-x  5 www-data www-data 4096 Jun  7 14:37 assets
drwxrwxr-x  9 www-data www-data 4096 Jun  7 14:38 content
-rwxrwxr-x  1 www-data www-data   67 Jun  7 14:46 index.php
drwxrwxr-x 10 www-data www-data 4096 Jun  7 14:40 kirby
drwxrwxr-x  3 www-data www-data 4096 Jun 13 17:04 media
drwxrwxr-x 11 www-data www-data 4096 Jun  7 15:22 site

So the owner and the group are www-data, but I can’t update the files. I need to look into this a bit more, but thanks for pointing me in the right direction.

Andy