ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Nextcloud 13.0 to 13.0.1 Upgrade Failing

    IT Discussion
    nextcloud 13
    5
    14
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • NashBrydgesN
      NashBrydges
      last edited by

      Thought I'd test my ability to upgrade now thet Nextcloud is running on Fedora but getting this error using the updater:

      0_1521656496157_29e90290-c880-4b6a-8ed4-701fb6224070-image.png

      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?

      1 Reply Last reply Reply Quote 0
      • black3dynamiteB
        black3dynamite
        last edited by

        setenforce 0

        NashBrydgesN B 2 Replies Last reply Reply Quote 1
        • NashBrydgesN
          NashBrydges @black3dynamite
          last edited by

          @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.

          1 Reply Last reply Reply Quote 1
          • B
            bnrstnr @black3dynamite
            last edited by bnrstnr

            @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...

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller
              last edited by

              I have 13.0.1 fail for lots of other reasons.

              1 Reply Last reply Reply Quote 0
              • B
                bnrstnr
                last edited by

                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
                
                JaredBuschJ 1 Reply Last reply Reply Quote 2
                • black3dynamiteB
                  black3dynamite
                  last edited by

                  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

                  JaredBuschJ 1 Reply Last reply Reply Quote 2
                  • JaredBuschJ
                    JaredBusch @bnrstnr
                    last edited by

                    @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.

                    B 1 Reply Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch @black3dynamite
                      last edited by JaredBusch

                      @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-interface

                      Correct, either use this or just setenforce 0. Both work fine since you are performing an upgrade manually and will turn them back on.

                      1 Reply Last reply Reply Quote 0
                      • B
                        bnrstnr @JaredBusch
                        last edited by

                        @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.

                        JaredBuschJ 1 Reply Last reply Reply Quote 0
                        • JaredBuschJ
                          JaredBusch @bnrstnr
                          last edited by

                          @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)

                          B 1 Reply Last reply Reply Quote 0
                          • B
                            bnrstnr @JaredBusch
                            last edited by

                            @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.

                            JaredBuschJ 1 Reply Last reply Reply Quote 0
                            • JaredBuschJ
                              JaredBusch @bnrstnr
                              last edited by

                              @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.

                              1 Reply Last reply Reply Quote 2
                              • JaredBuschJ
                                JaredBusch
                                last edited by

                                0_1521665584686_c6d45354-85b9-4b3d-bd72-1a1af431ed1a-image.png

                                1 Reply Last reply Reply Quote 1
                                • 1 / 1
                                • First post
                                  Last post