I’m using the system’s package for my Nextcloud installation.
Every time I update the package via dnf (or any other mechanism), I can’t login to Nextcloud anymore:
"Cannot write into “apps” directory
This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file."
So I fix it by chown’ing /usr/share/nextcloud/apps to the apache user.
This seems to be somehow wrong. I can’t imagine everyone’s going through the same trouble.
Thanks for the hint. That’s information I already found elsewhere, but good to know about the rpm option.
What doesn’t answer there is this:
They are always referring to /var/lib/nextcloud/apps, but my trouble is related to /usr/share/nextcloud/apps, which content is part of the Nextcloud Fedora package.
So with the next update, the permissions are set back to root and Nextcloud complains that it can’t write there.
I will quickly fire up a clean F33 VM and verify the setup there to see if there is something odd with my installation.
Hrm, not sure. We’ll have to wait for someone that uses the package to check. This is what the guidelines say:
Nothing should be writing to the /usr/share directory: only stuff that needs to be read should go in there. The way to go is generally to create your deployments (since you could have multiple deployments from one rpm package) in /var/.. and symlink them to /usr/share.... That way all your data is written into /var, and whenver the package is updated, you receive the updated version too. I.e., deployments of the web-apps go in /var.
I can’t find any docs on this but here’s the README for the mediawiki package which is deployed in /srv/..:
Who knows since when I had this config.php in place, maybe even from a manual installation without the package.
After adding these settings Nextcloud doesn’t complain anymore, that it can’t write to the /usr/share/nextcloud/apps folder.
So in case anyone else has this kind of problem, maybe this will assist you.