Fedora's Nextcloud server package: update trouble


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.

Is it just my setup or is this a common problem?



Have you looked at the docs that are included in the package? The README etc. suggests that extra steps are required after installation/update:


These should be included in the RPM too. You can see them by running:

rpm -qd <package name>
1 Like

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.

1 Like

I installed Nextcloud with DNF on Fedora 33 for testing.
Can log in with default ownership/permissions.


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/..:



OK, so I compared a fresh untinkered installation with my running one.
It looks that I’m missing this configuration array:

‘apps_paths’ =>
array (
0 =>
array (
‘path’ => ‘/usr/share/nextcloud/apps’,
‘url’ => ‘/apps’,
‘writable’ => false,
1 =>
array (
‘path’ => ‘/var/lib/nextcloud/apps’,
‘url’ => ‘/apps-appstore’,
‘writable’ => true,

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.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.