pydio / pydio-core

Pydio 8 official repository
https://pydio.com
GNU Affero General Public License v3.0
867 stars 289 forks source link

Upgrade from 7.0.3 to 7.0.4 is failing #1324

Closed deajan closed 6 years ago

deajan commented 7 years ago

Hello,

Doing an in-app upgrade of 7.0.3 community, I get the following (tried twice, refreshing browser, make sure all other instances are closed, also restarted php-fpm, using apache 2.4.18 & php-fpm 7.0.15):

Applying upgrade pydio-core-upgrade-7.0.3-7.0.4.zip Checking download permissions

  • OK Downloading upgrade archive
  • File saved in /home/www/mypydio.install.tld/ftp/www/data/tmp/update/pydio-core-upgrade-7.0.3-7.0.4.zip Checking archive integrity
  • Hash is ok (e70770670f8d28690414e49de6ea2c93) Checking folders permissions
  • OK Extracting Archive
  • Extracted folder /home/www/mypydio.install.tld/ftp/www/data/tmp/update/pydio-core-upgrade-7.0.3-7.0.4 Backuping your modified files
  • Nothing to do Copying core source files
  • Error : Unable to emit response; headers already sent

Feel free to ask any logs or tests.

tsebastien commented 7 years ago

I have exactly the same error... Do you have any solutions ?

Thank you for your answer

cdujeu commented 7 years ago

@c12simple did you see that already?

deajan commented 7 years ago

No answer so far for me ! Just for the records, what OS / httpd / php version are you running ? Mine is CentOS 7 x64 / apache 2.4.18 / php 7.0.16 (using redhat SCL) in case it could be related to specifc newer versions of software.

deajan commented 7 years ago

Well.... up anyone ?

sbsrouteur commented 7 years ago

@deajan, found out that if you installed from a tar, there are some files in the .git/pack structure that have a wrong permissions. The log gives you an access denied on a file (at least it did for me). Went to the culprit folder (it was all r-- for me) chmod +w the whole folder and upgrade went through with no further problem.

deajan commented 7 years ago

@sbsrouteur I actually installed earlier 7.0.1 version from a tar file, but don't have any .git folder and try to update through the GUI. Also, cannot find any log files. What's the log path you're talking about please ?

sbsrouteur commented 7 years ago

@deajan : in the dashboard on the site, there is a log section, you pick your current date (I guess you installed today), and you should find the culprit file.

deajan commented 7 years ago

@sbsrouteur I am ashamed, I searched for some log file instead of the GUI log. Found indeed that git directory, in my case it was ./core/vendor/davegardnerisme/nsqphp/.git/objects/pack/relative from the pydio install. Did a chmod 644 on the objects inside that directory, fixed the update procedure. Big thanks :)

@cdujeu Would you consider adding the lastlogged errors to the update result ?

gumbo2k commented 7 years ago

I had the same issue here. I installed form pydio-core-7.0.3.tar.gz and the upgrade failed with a less then helpful

Error : Could not send response!

I had to look quite a while until I found

date ip level user action source params cursor text ajxp_im_time

03-22-17 23:23:10 93.220.66.221 ERROR admin error l.593 (3) UpgradeManager.php message=copy(/var/www/pydio/core/vendor/davegardnerisme/nsqphp/.git/objects/pack/pack-460344b6f55bf4118842892b531400d3cca133d3.idx): failed to open stream: Permission denied 20244 03-22-17 23:23:10 1490227737

That file had r--r--r permissions.

Afterwards I got hung up on this one:

date ip level user action source params cursor text ajxp_im_time

03-22-17 23:28:54 93.220.66.221 ERROR admin error l.593 (2) UpgradeManager.php message=copy(/var/www/pydio/core/vendor/davegardnerisme/nsqphp/.git/index): failed to open stream: Permission denied 20246 03-22-17 23:28:54 1490227737

..where the file belonged to root instead of www-data .

kebikec commented 7 years ago

same problem, same solution :-)

** BEFORE ***** Applying upgrade pydio-core-upgrade-7.0.3-7.0.4.zip Checking download permissions

solution; chmod 644 /var/www/pydio7/core/vendor/davegardnerisme/nsqphp/.git/objects/pack/.

rmeske commented 7 years ago

I am upgrading 7.0.3 to 7.0.4. and have the same problem. None of the solutions worked for me.

I verified all pydio files and folders are writeable. I specifically went through all folders in: /var/www/pydio7/core/vendor/davegardnerisme/nsqphp/.git/ set to 644 and ownership is the apache service.

However, I am still getting the following error in the log: error l.593 | from UpgradeManager.php | message=copy(/var/www/pydio/core/vendor/davegardnerisme/nsqphp/.git/FETCH_HEAD): failed to open stream: Permission denied,

I doubled checked that FETCH_HEAD had a permission of 644.

Any other ideas?

Regards, Ron

cdujeu commented 7 years ago

hi ron, mmmm, did you try to set a basic 666 recursively on the whole ..../nsqphp/.git folder?

rmeske commented 7 years ago

Hi Charles, I just tried that and still receive the same error. Just to confirm the ownership is fine with the owner and group being set to the apache service, correct?

Ron

cdujeu commented 7 years ago

yes - can you try to basically REMOVE this whole .git folder?

cdujeu commented 7 years ago

(it's not used anyway)

rmeske commented 7 years ago

I removed the folder and was able to perform the upgrade from 7.0.3 to 7.0.4. Now when I try to upgrade to 8.0.0, I am getting another error.

I went through and set all folder & files in /var/www/pydio/plugins to 666 and received an internal server error. I then changed and set to 764 and the upgrade worked.

Now that I have all the upgrades installed, I am looking for where in the documentation it species the proper permissions to set for the pydio files & folders. They are not listed under the "Securing your installation".

rmeske commented 7 years ago

After a lot of digging I found the following document: https://pydio.com/en/docs/kb/security/permission-pydio’s-filesfolders

It seems this should be part of the installation/upgrade instructions and not buried. It would be even better if there were clear update instructions that include what permissions and ownership are needed on files & folders for doing the in-app upgrades.

Regards, Ron