A Fix for SELinux problems when updating a server on Fedora 32

Hello!

I’ve already solved this issue, but thought I’d post here so others might be able to benefit.
My system: Fedora 32
The error I had (past tense) looked like this:


I looked around for a while and many, many solutions just told people to:
chown -R apache:apache /usr/share/nextcloud
This works, if your problem is bad permissions. If you’re running Fedora and you have an error when running the web updater that looks like the picture it is not.

Your issue is instead SELinux, which is a royal pain in the rear end, but makes your system safer (I think).
Disable SELinux following the instructions here:


Then run your update from the web updater.
Then re-enable it (so your server is secure).

That should get you running. I’ve read through the nextcloud documentation on SELinux here: https://docs.nextcloud.com/server/15/admin_manual/installation/selinux_configuration.html and followed all of their recommendations, which did not help. Perhaps that documentation is in need of an update? Unsure. But for the moment, disabling it, running your update, and re-enabling it works.

I hope this helps someone and saves you the couple of days of headache it caused me!

1 Like

Disabling SeLinux is generally never a good idea.

A better solution would be to allow temporary write permission, see:

Hope this helps :wink:

It is getting even worser when using OnlyOffice or Collabora CODE. The list with SELinux permission becomes long.
I mean it is difficult to get rid of all those messages when they become more and more with every update.
SELinux is fine but can be a real pain for those of us who haven’t that knowledge to fix it ourselves.

System: Fedora 33 - Server Edition, Nextcloud 20.0.2