Can't update from 10.0.0.2.1 to 10.0.0.3


#1

Steps to reproduce

  1. Login to the server webpage as admin
  2. Go to admin settings
  3. Click General under Admin
  4. Click on "Open Updater" next to "A new version is available: ownCloud 10.0.3"
  5. After "Initializing
    Current version is 10.0.2.1
    Online version is 10.0.3 [stable]" comes up click on "Start"

Expected behaviour

Tell us what should happen
Well I would think it would take a backup and then begin the update process

Actual behaviour

Tell us what happens instead

I get this:

Checking system
eChecking system health.e
eThe following files and directories are not writable:e
/var/www/owncloud/core
/var/www/owncloud/core/Application.php
/var/www/owncloud/core/Command
/var/www/owncloud/core/Command/App
/var/www/owncloud/core/Command/App/CheckCode.php
/var/www/owncloud/core/Command/App/Disable.php
/var/www/owncloud/core/Command/App/Enable.php
... and 7983 more items
ePlease check if owner and permissions for these files are correct.e

Server configuration

Operating system:
Ubuntu 16.04.3

Web server:
Apache

Database:
MariaDB/MySQL

PHP version:
The version that comes with Ubuntu 16.04.3

ownCloud version: (see ownCloud admin page)
10.0.0.2.1

Updated from an older ownCloud or fresh install:
Fresh

Where did you install ownCloud from:
Followed these instrutions:
https://doc.owncloud.org/server/latest/admin_manual/installation/source_installation.html
Under:
Install the Required Packages¶
On Ubuntu 16.04 LTS Serve

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

No errors have been found.

The content of config/config.php:

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or 

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

When I try "sudo -u www-data php occ config:list system" I get:
Could not open input file: occ

*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.

List of activated apps:

I did not activate any apps

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

Same: Could not open input file: occ

Are you using external storage, if yes which one: local/smb/sftp/...

Yes SMB and it works perfectly

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

No

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Could not open input file: occ

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

I need more instructions to do that

Client configuration

Browser:

Chrome Version 61.0.3163.100 (Official Build) (64-bit)

Operating system:

Windows 10 x64

Logs

Web server error log

?????????
Insert your webserver log here

?????????

ownCloud log (data/owncloud.log)

Insert your ownCloud log here

??????????????????????

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...

??????????????????


#2

As the output says - the files and folder are not writable.
Please make sure the user running the web server is also owning the files.

Since you are on Ubuntu - this should be www-data


#3

I don't know how to do that. I created only 1 user which is the admin in owncloud. If I try to log into owncloud using any ubuntu account it fails.


#4

You know how to access your server via ssh?
You know how to use a terminal/shell?


#5

Yes I know how. I had to when I installed owncloud.


#6

Hey,

can you connect to your server via ssh?

If yes:

try this command:

chown -R www-data:www-data /var/www/owncloud/


#7

Thanks. I thought this was it but it just got me a little further:

Checking system
Creating a checkpoint
Downloading

Updating core

Extracting source into /var/www/owncloud/data/updater-data/_oc_upgrade/10.0.3
sh: 1: unzip: not found

Copying the application comments
Copying the application configreport
Copying the application dav
Copying the application encryption
Copying the application external
Copying the application federatedfilesharing
Copying the application federation
Copying the application files
Copying the application files_antivirus
Copying the application files_external
Copying the application files_sharing
Copying the application files_trashbin
Copying the application files_versions
Copying the application files_videoplayer
Copying the application firstrunwizard
Copying the application market
Copying the application notifications
Copying the application provisioning_api
Copying the application systemtags
Copying the application templateeditor
Copying the application theme-example
Copying the application updatenotification
Copying the application user_external

e e
e [GuzzleHttp\Exception\ServerException] e
e Server error response [url] https://###.###.com/index.php/occ/upgrade [status code] 500 [reason phrase] Internal Server Error e
e e

eupgrade:executeCoreUpgradeScriptse


#8

okay, try this

sudo -u www-data php occ maintenance:mode --off

then do

sudo -u www-data php occ upgrade


#9

It did something. After I rebooted I had a button to press on the home page to update again (instead of the login fields)

I clicked it and got other errors.

Then I can login and in the server settings I see that I am at ver.: 10.0.3.3

At the top of the page there is a yellow warning:
"There were problems with the code integrity check"
And in red:
Some files have not passed the integrity check. Further information on how to resolve this issue can be found in our documentation. (List of invalid files… / Rescan…)


#10

okay, thats good. well that's better than that what we had before.

Can you give me the list of the invalid files? You should get them by clicking on the error message


#11

Results

  • core
    • FILE_MISSING
      • CHANGELOG.md
    • INVALID_HASH
      • updater/app/config/container.php
      • updater/pub/js/main.js
      • updater/src/Command/ExecuteCoreUpgradeScriptsCommand.php
      • updater/src/Command/StartCommand.php
      • updater/src/Utils/AppManager.php
      • updater/src/Utils/Locator.php
      • updater/src/Utils/OccRunner.php
      • updater/vendor/autoload.php
      • updater/vendor/composer/autoload_real.php
      • updater/vendor/composer/autoload_static.php
    • EXTRA_FILE
      • updater/src/Command/EnableNotShippedAppsCommand.php
      • updater/src/Command/DisableNotShippedAppsCommand.php

#12

Can you try running my 2 commands from above again and see if it helps?


#13

Also, regarding the missing file - here is how to get it:


#14

When I run both I get this: Could not open input file: occ


#15

you have to run it in /var/www/owncloud or your owncloud dir


#16

Ok I just did it and I get: owncloud is already latest version


#17

alright, you can trick owncloud to do an upgrade.

just edit the config.php to an older version.

like now there is a version like 10.0.3.something

just change the 3 to a 2 and do the 2 commands from above and see if you still get code integrity errors


#18

I clicked the link but I really don't understand what I'm supposed to do from what I read. I'm too ignorant.


#19

first do what I suggested in the commend above, then we will deal with the changelog.md file


#20

Remind me where I find config.php please