Nextcloud 13.0 to 13.0.1 Upgrade Failing
-
Thought I'd test my ability to upgrade now thet Nextcloud is running on Fedora but getting this error using the updater:
Here are the folder permissions:
drwxr-xr-x. 2 apache apache 43 Feb 5 19:38 updater
Just for fun, I changed permissions to this temporarily and it still failed.
drwxrwxrwx. 2 apache apache 43 Feb 5 19:38 updater
Any clues as to what I'm not getting?
-
setenforce 0
-
@black3dynamite said in Nextcloud 13.0 to 13.0.1 Upgrade Failing:
setenforce 0
Now I feel silly. Thanks That worked. Switched back to
setenforce 1
afterwards. -
@black3dynamite You shouldn't have to do this to upgrade. I've upgraded 2 instances so far with SELinux enabled without a hitch.
EDIT: I guess it depends on your SELinux settings...
-
I have 13.0.1 fail for lots of other reasons.
-
Using @JaredBusch's script should set all the permissions correctly.
#download the script wget -O ~/selinux_config.sh https://raw.githubusercontent.com/sorvani/scripts/master/Nextcloud/selinux_config.sh #set it to executable chmod +x ~/selinux_config.sh #execute the script ~/selinux_config.sh
-
Another way to update via the web interface is to enable
httpd_unified
and then disable it after you are done.
https://docs.nextcloud.com/server/12/admin_manual/installation/selinux_configuration.html#enable-updates-via-the-web-interface -
@bnrstnr said in Nextcloud 13.0 to 13.0.1 Upgrade Failing:
Using @JaredBusch's script should set all the permissions correctly.
#download the script wget -O ~/selinux_config.sh https://raw.githubusercontent.com/sorvani/scripts/master/Nextcloud/selinux_config.sh #set it to executable chmod +x ~/selinux_config.sh #execute the script ~/selinux_config.sh
Not for updating it does not.
-
@black3dynamite said in Nextcloud 13.0 to 13.0.1 Upgrade Failing:
Another way to update via the web interface is to enable
httpd_unified
and then disable it after you are done.
https://docs.nextcloud.com/server/12/admin_manual/installation/selinux_configuration.html#enable-updates-via-the-web-interfaceCorrect, either use this or just
setenforce 0
. Both work fine since you are performing an upgrade manually and will turn them back on. -
@JaredBusch What exactly does this do?
semanage fcontext -a -t ${httpdrw} "${ocpath}/updater(/.*)?"
I don't know much about SELinux, but I thought this allowed the application to make changes to the files in this folder.
-
@bnrstnr said in Nextcloud 13.0 to 13.0.1 Upgrade Failing:
@JaredBusch What exactly does this do?
semanage fcontext -a -t ${httpdrw} "${ocpath}/updater(/.*)?"
I don't know much about SELinux, but I thought this allowed the application to make changes to the files in this folder.
I am using variables here as I intended to make them parameters and never got around to it yet.
${httpdrw} = httpd_sys_rw_content_t
${ocpath} = /var/www/html/nextcloud
This allows anything to read and write to the files if the owner of the process is the httpd user account (apache) -
@jaredbusch So this command would allow the upgrade to work? Is the web upgrade process not done by the apache account?
I'm curious because my web upgrade worked perfectly without disabling selinux or enabling
httpd_unified
. I just figured that line in your script gave the proper permissions to apache to do the upgrade. -
@bnrstnr said in Nextcloud 13.0 to 13.0.1 Upgrade Failing:
@jaredbusch So this command would allow the upgrade to work? Is the web upgrade process not done by the apache account?
I'm curious because my web upgrade worked perfectly without disabling selinux or enabling
httpd_unified
. I just figured that line in your script gave the proper permissions to apache to do the upgrade.The upgrade is done by the httpd account, but it touches potentially every file. Thus, it fails because most of the files do NOT have the
httpd_sys_rw_content_t
context. -