Yes I couldn't open the link discord @SKevo provided first. Did it now and reread the discussion.
Problem seems to be solved now.
Usually I only use backend, which worked. But when I ran the command inside ssh I apparently used
sudo php flarum cache:clear which created the root folders. I swear it always worked like that before.
If I run it without
sudoin ssh I get:
Could not clear contents of storage/cache. Please adjust file permissions and try again. This can frequently be fixed by clearing cache via the Tools dropdown on the Administration Dashboard page.
I didn't want to give my ssh user rights to the folder. Guess I need to run the command in context of the webserver user then.
Thanks for clarifying.
This line helps of course:
Clark — 14.09.2022
if the command runs as sudo it should be as simple as adding the user in front sudo -u www-data php flarum cache:clear without the need to change who the command runs as entirely