Update needed and nobody

Steps to reproduce

  1. Visit the URL where I have my owncloud

Expected behaviour

Expect to log in as usual

Actual behaviour

I get this warning instead:
“Update needed”

I have read this older post "Update needed" although up to date - #2 by cortho and I think I have a problem of duplicated apps and I don´t know whats the best way to solve it.
I have checked that the “market” app is in the “apps” folder and also in the “apps-external” folder. The appinfo.xml shows different versions: 0.6.0 and 0.6.1 respectively.

What is the best way to remove or sort this problem? Because I have found a few more duplicated apps.

Not sure if the problem was during the upgrade. When running “sudo -u www-data php occ upgrade” I get a message “upgrade already in progress” and I had to disable maintenance mode to run the upgrade.

Please let me know if I am doing something wrong because this is the second time that is happening and I dont want to keep errors in the installation and have bigger issues in the meantime.

Server configuration

Operating system:
Ubuntu 18.04.5 LTS
Web server:
Apache/2.4.29 (Ubuntu)
Database:
10.5.11-MariaDB-1:10.5.11+maria~bionic mariadb.org binary distribution
PHP version:
PHP 7.4.21 (cli) (built: Jul 1 2021 16:09:23) ( NTS )
ownCloud version: (see ownCloud admin page)
10.7.0.4
Updated from an older ownCloud or fresh install:

Where did you install ownCloud from:
source
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.

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

*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:

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.

{
“system”: {
“instanceid”: “fdsfsafdsafsay”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
REMOVED SENSITIVE VALUE
],
“datadirectory”: “/var/www/owncloud/data”,
“overwrite.cli.url”: “https://REMOVED SENSITIVE VALUE”,
“dbtype”: “mysql”,
“version”: “10.7.0.4”,
“dbname”: “owncloud”,
“dbhost”: “localhost”,
“dbtableprefix”: “oc_”,
“mysql.utf8mb4”: true,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“logtimezone”: “Europe/Berlin”,
“apps_paths”: [
{
“path”: “/var/www/owncloud/apps”,
“url”: “/apps”,
“writable”: false
},
{
“path”: “/var/www/owncloud/apps-external”,
“url”: “/apps-external”,
“writable”: true
}
],
“installed”: true,
“memcache.local”: “\OC\Memcache\APCu”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_smtpmode”: “smtp”,
“mail_smtpsecure”: “ssl”,
“mail_smtpauthtype”: “LOGIN”,
“mail_smtpauth”: 1,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “465”,
“mail_smtpname”: “REMOVED SENSITIVE VALUE”,
“mail_smtppassword”: “REMOVED SENSITIVE VALUE”,
“loglevel”: 2,
“logdateformat”: “F d, Y H:i:s”,
“skeletondirectory”: “/var/www/owncloud/apps-external/alternative-skeleton”,
“integrity.ignore.missing.app.signature”: [
“theme-custom”
],
“maintenance”: false,
“files_antivirus.av_cmd_options”: “”,
“files_antivirus.av_path”: “/usr/bin/clamscan”
},
“apps”: {
“activity”: {
“enabled”: “yes”,
“installed_version”: “2.6.0”,
“types”: “filesystem”
},
“backgroundjob”: {
“lastjob”: “7”
},
“calendar”: {
“enabled”: “yes”,
“installed_version”: “1.6.4”,
“signed”: “true”,
“types”: “”
},
“comments”: {
“enabled”: “yes”,
“installed_version”: “0.3.0”,
“types”: “logging,dav”
},
“configreport”: {
“enabled”: “yes”,
“installed_version”: “0.2.0”,
“types”: “filesystem”
},
“contacts”: {
“enabled”: “yes”,
“installed_version”: “1.5.5”,
“signed”: “true”,
“types”: “”
},
“core”: {
“backgroundjobs_mode”: “cron”,
“first_install_version”: “10.6.0.5”,
“grace_period”: “1613052404”,
“installedat”: “1612954816.5853”,
“lastcron”: “1625822107”,
“lastupdateResult”: “[]”,
“lastupdatedat”: “1625820611”,
“legal.imprint_url”: “https://www.REMOVED SENSITIVE VALUE/”,
“legal.privacy_policy_url”: “https://REMOVED SENSITIVE VALUE//”,
“oc.integritycheck.checker”: “[]”,
“public_files”: “files_sharing/public.php”,
“public_webdav”: “dav/appinfo/v1/publicwebdav.php”,
“shareapi_allow_mail_notification”: “yes”,
“shareapi_allow_public_notification”: “yes”,
“shareapi_allow_social_share”: “no”,
“shareapi_default_permissions”: “1”,
“shareapi_public_notification_lang”: “es”,
“umgmt_set_password”: “true”,
“umgmt_show_backend”: “false”,
“umgmt_show_email”: “true”,
“umgmt_show_is_enabled”: “false”,
“umgmt_show_last_login”: “true”,
“umgmt_show_password”: “true”,
“umgmt_show_quota”: “true”,
“umgmt_show_storage_location”: “false”,
“vendor”: “owncloud”
},
“dav”: {
“enabled”: “yes”,
“installed_version”: “0.6.0”,
“types”: “filesystem”
},
“federatedfilesharing”: {
“enabled”: “yes”,
“installed_version”: “0.5.0”,
“types”: “filesystem”
},
“federation”: {
“enabled”: “no”,
“installed_version”: “0.1.0”,
“types”: “authentication”
},
“files”: {
“cronjob_scan_files”: “500”,
“default_quota”: “1 GB”,
“enabled”: “yes”,
“installed_version”: “1.5.2”,
“types”: “filesystem”
},
“files_antivirus”: {
“av_infected_action”: “delete”,
“av_max_file_size”: “-1”,
“av_mode”: “socket”,
“av_socket”: “/var/run/clamav/clamd.ctl”,
“av_stream_max_length”: “26214400”,
“enabled”: “yes”,
“installed_version”: “1.0.0”,
“signed”: “true”,
“types”: “filesystem,dav”
},
“files_external”: {
“enabled”: “yes”,
“installed_version”: “0.7.1”,
“types”: “filesystem”
},
“files_mediaviewer”: {
“enabled”: “yes”,
“installed_version”: “1.0.4”,
“signed”: “true”,
“types”: “”
},
“files_pdfviewer”: {
“enabled”: “yes”,
“installed_version”: “0.12.1”,
“signed”: “true”,
“types”: “”
},
“files_sharing”: {
“enabled”: “yes”,
“incoming_server2server_share_enabled”: “no”,
“installed_version”: “0.14.0”,
“outgoing_server2server_share_enabled”: “no”,
“types”: “filesystem”
},
“files_texteditor”: {
“enabled”: “yes”,
“installed_version”: “2.3.1”,
“signed”: “true”,
“types”: “”
},
“files_trashbin”: {
“enabled”: “yes”,
“installed_version”: “0.9.1”,
“types”: “filesystem”
},
“files_versions”: {
“enabled”: “yes”,
“installed_version”: “1.3.0”,
“types”: “filesystem”
},
“firstrunwizard”: {
“enabled”: “yes”,
“installed_version”: “1.2.0”,
“types”: “”
},
“market”: {
“enabled”: “yes”,
“files_antivirus”: “1.0.0”,
“files_mediaviewer”: “1.0.4”,
“files_pdfviewer”: “0.12.1”,
“files_texteditor”: “2.3.1”,
“installed_version”: “0.6.1”,
“market”: “0.6.1”,
“signed”: “true”,
“types”: “”
},
“notifications”: {
“enabled”: “yes”,
“installed_version”: “0.5.2”,
“types”: “logging”
},
“provisioning_api”: {
“enabled”: “yes”,
“installed_version”: “0.5.0”,
“types”: “prevent_group_restriction”
},
“systemtags”: {
“enabled”: “yes”,
“installed_version”: “0.3.0”,
“types”: “logging”
},
“templateeditor”: {
“enabled”: “yes”,
“installed_version”: “0.4.0”,
“types”: “”
},
“theme-enterprise”: {
“enabled”: “no”,
“installed_version”: “2.2.1”,
“types”: “theme”
},
“theme-custom”: {
“enabled”: “yes”,
“installed_version”: “1.0.0”,
“types”: “theme”
},
“updatenotification”: {
“core”: “10.7.0”,
“enabled”: “yes”,
“installed_version”: “0.2.1”,
“types”: “”
}
}
}

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

Are you using encryption: yes/no

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

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

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.

Client configuration

Browser:

Operating system:

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

As you can see in your config.php the directory apps is read only while the directory apps-external is read-write. Therefore, when the market app upgrades an app it will be saved in the apps-external folder.

So for any app which is present in apps-external delete the same app in the apps directory, then the upgrade issue is gone.

You might have to repeat this step once the market app upgrades another app.

I would consider this a bug. The concept of having two app directories, one for the stock apps, one for everything else is not a bad idea. But it should never disturb upgrading.

Commands like occ app:list etc. always look in /apps-external first, seem to ignore apps with the same name in /apps. If you disable an app, residing in /apps-external and then uninstall it, it’s original version in /apps comes back to the show, disabled for now, but upgradable. It’s somewhat strange anyway. I’d prefer keeping the stock apps in /apps up to date, without any (disturbing) doublets.

This can be achieved by temporarily switch to 'writable' => true in config.php file for updating stock apps. Or you can, depending on the app, move the newer version in /apps-external to /apps, replacing the outdated version.

I like to keep things tidy.

Indeed this is a lousy bug. It was discussed some time ago on github but IIRC it never came to a solution. I don’t see why the backend logic cannot always use the highest available app version, regardless how many apps in how many directories reside.

Especially when the ownCloud default setup comes with those two directories (apps and apps-external).

This is not even constistent, in docker the apps-external directory is called custom

Copying back updated apps to the readonly apps folder sure is an option. I was considering this question from the scope of the OP where it is easier/less work to delete an old directory than to safely copy/delete the correct directories.

1 Like

Thanks everyone for your replies.

I have finally deleted the apps that were present in “apps-external” and “apps” directories, from the “apps” directory.

They were:
files_antivirus
files_mediaviewer
files_pdfviewer
files_texteditor
market

Hope it is the correct way to do it.

I hope so, too. But remember, the next update might bring in fresh stock apps in /apps directory, so you’ll have to clean up again. An endless story, unless someone fixes this odd behavior.

There is an ownCloud issue on github which did not receive any updates in over a year. I added a comment which might raise developers’ interests.

1 Like

Hmm, I just wonder about the “which is confirmed to be fixed in 10.3.1 release, fixed by #36054”.

1 Like

and I wonder why in the other issue a “context is required”. I hope I gave that context with the links to the central issues: