Impossible to upgrade to 10.6.0 : setting times of '/etc/cron.d/php': Operation not permitted

Hello,
I tried today to update my docker owncloud from 10.4.1 to 10.6.0
At first I couldn’t because I had enables apps that were not upgradable.
When I disabled them, the upgrade system stopped later in the process, while trying to change cron.d files times because of permission problems.
I tried to change the owner of these files to www-data and permissions to 777 but nothing changed

Steps to reproduce

  1. Activate maintenance mode using docker-compose exec owncloud occ maintenance:mode --on
  2. Change version in .env to 10.6.0
  3. docker-compose pull
  4. docker-compose up -d

Expected behaviour

The upgrade system should automatically upgrade to 10.6.0

Actual behaviour

Upgrade stops while Touching cron configs with the following error :

Set mode for background jobs to 'cron'
owncloud_1  | Touching cron configs...
owncloud_1  | touch: setting times of '/etc/cron.d/e2scrub_all': Operation not permitted
owncloud_1  | touch: setting times of '/etc/cron.d/owncloud': Operation not permitted
owncloud_1  | touch: setting times of '/etc/cron.d/php': Operation not permitted 

Server configuration

Operating system: Raspbian GNU/Linux 10 (buster)

Web server: ?

Database: webhippie/mariadb:latest

PHP version: 7.4.3

ownCloud version: 10.6.0

Updated from an older ownCloud or fresh install: Updated from 10.4.1

Where did you install ownCloud from: Docker hub

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.

Unavailable as the container won’t start

The content of config/config.php:

{
    "system": {
        "apps_paths": [
            {
                "path": "\/var\/www\/owncloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/owncloud\/custom",
                "url": "\/custom",
                "writable": true
            }
        ],
        "trusted_domains": [
            "localhost"
        ],
        "datadirectory": "\/mnt\/data\/files",
        "dbtype": "mysql",
        "dbhost": "db",
        "dbname": "owncloud",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "log_type": "owncloud",
        "supportedDatabases": [
            "sqlite",
            "mysql",
            "pgsql"
        ],
        "upgrade.disable-web": true,
        "default_language": "en",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "logfile": "\/mnt\/data\/files\/owncloud.log",
        "loglevel": 2,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "mysql.utf8mb4": true,
        "filelocking.enabled": true,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "redis",
            "port": "6379"
        },
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "version": "10.6.0.5",
        "logtimezone": "Europe\/Paris",
        "installed": true,
        "instanceid": "oc0qzhwo92ba",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": true
    }
}

List of activated apps:

ownCloud is in maintenance mode - no app have been loaded

Enabled:
  - activity: 2.6.0
  - comments: 0.3.0
  - configreport: 0.2.0
  - dav: 0.6.0
  - federatedfilesharing: 0.5.0
  - federation: 0.1.0
  - files: 1.5.2
  - files_external: 0.7.1
  - files_mediaviewer: 1.0.3
  - files_pdfviewer: 0.11.2
  - files_sharing: 0.14.0
  - files_texteditor: 2.3.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - firstrunwizard: 1.2.0
  - market: 0.6.0
  - notifications: 0.5.2
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.4.0
  - updatenotification: 0.2.1
Disabled:
  - admin_audit
  - announcementcenter
  - customgroups
  - encryption
  - enterprise_key
  - external
  - files_antivirus
  - files_classifier
  - files_external_dropbox
  - files_external_ftp
  - files_ldap_home
  - files_lifecycle
  - firewall
  - graphapi
  - guests
  - oauth2
  - openidconnect
  - password_policy
  - ransomware_protection
  - sharepoint
  - systemtags_management
  - theme-enterprise
  - user_external
  - user_ldap
  - user_shibboleth
  - windows_network_drive
  - wopi
  - workflow

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Opera 74.0.3911.107

Operating system: Windows 10 Professional

Logs

Web server error log

owncloud_1  | Creating volume folders...
owncloud_1  | Creating hook folders...
owncloud_1  | Waiting for MySQL...
owncloud_1  | services are ready!
owncloud_1  | Waiting for Redis...
owncloud_1  | services are ready!
owncloud_1  | Writing config file...
owncloud_1  | Fixing base perms...
owncloud_1  | Fixing data perms...
owncloud_1  | Fixing hook perms...
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | Upgrading server database...
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | <warning>ownCloud is in maintenance mode</warning>
owncloud_1  | Maybe an upgrade is already in process. Please check the logfile (data/owncloud.log). If you want to re-run the upgrade procedure, remove the "maintenance mode" from config.php and call this script again.
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | <warning>ownCloud is in maintenance mode</warning>
owncloud_1  | Maybe an upgrade is already in process. Please check the logfile (data/owncloud.log). If you want to re-run the upgrade procedure, remove the "maintenance mode" from config.php and call this script again.
owncloud_1  | Writing objectstore config...
owncloud_1  | Writing php config...
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | Updating htaccess config...
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | .htaccess has been updated
owncloud_1  | Writing apache config...
owncloud_1  | Enabling cron background...
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | Set mode for background jobs to 'cron'
owncloud_1  | Touching cron configs...
owncloud_1  | touch: setting times of '/etc/cron.d/e2scrub_all': Operation not permitted
owncloud_1  | touch: setting times of '/etc/cron.d/owncloud': Operation not permitted
owncloud_1  | touch: setting times of '/etc/cron.d/php': Operation not permitted
owncloud_1  | Creating volume folders...
owncloud_1  | Creating hook folders...
owncloud_1  | Waiting for MySQL...
owncloud_1  | services are ready!
owncloud_1  | Waiting for Redis...
owncloud_1  | services are ready!
owncloud_1  | Writing config file...
owncloud_1  | Fixing base perms...
owncloud_1  | Fixing data perms...
owncloud_1  | Fixing hook perms...
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | Upgrading server database...
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | <warning>ownCloud is in maintenance mode</warning>
owncloud_1  | Maybe an upgrade is already in process. Please check the logfile (data/owncloud.log). If you want to re-run the upgrade procedure, remove the "maintenance mode" from config.php and call this script again.
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | <warning>ownCloud is in maintenance mode</warning>
owncloud_1  | Maybe an upgrade is already in process. Please check the logfile (data/owncloud.log). If you want to re-run the upgrade procedure, remove the "maintenance mode" from config.php and call this script again.
owncloud_1  | Writing objectstore config...
owncloud_1  | Writing php config...
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | Updating htaccess config...
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | .htaccess has been updated
owncloud_1  | Writing apache config...
owncloud_1  | Enabling cron background...
owncloud_1  | ownCloud is in maintenance mode - no app have been loaded
owncloud_1  |
owncloud_1  | Set mode for background jobs to 'cron'
owncloud_1  | Touching cron configs...
owncloud_1  | touch: setting times of '/etc/cron.d/e2scrub_all': Operation not permitted
owncloud_1  | touch: setting times of '/etc/cron.d/owncloud': Operation not permitted
owncloud_1  | touch: setting times of '/etc/cron.d/php': Operation not permitted

This is repeating over and over

ownCloud log (data/owncloud.log)

{"reqId":"eMtns8bbFL7UKNqO03Ac","level":0,"time":"1970-01-01T01:00:00+01:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"starting upgrade from 10.6.0.5 to 10.6.0.5"}
{"reqId":"eMtns8bbFL7UKNqO03Ac","level":3,"time":"1970-01-01T01:00:00+01:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {\"Exception\":\"OC\\\\RepairException\",\"Message\":\"Upgrade is not possible\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Repair.php(90): OC\\\\Repair\\\\Apps->run()\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Updater.php(219): OC\\\\Repair->run()\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Updater.php(111): OC\\\\Updater->checkAppsCompatibility()\\n#3 \\\/var\\\/www\\\/owncloud\\\/core\\\/Command\\\/Upgrade.php(266): OC\\\\Updater->upgrade()\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Command\\\/Command.php(255): OC\\\\Core\\\\Command\\\\Upgrade->execute()\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(1009): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run()\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(273): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand()\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(149): Symfony\\\\Component\\\\Console\\\\Application->doRun()\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Console\\\/Application.php(165): Symfony\\\\Component\\\\Console\\\\Application->run()\\n#9 \\\/var\\\/www\\\/owncloud\\\/console.php(116): OC\\\\Console\\\\Application->run()\\n#10 \\\/var\\\/www\\\/owncloud\\\/occ(11): require_once('\\\/var\\\/www\\\/ownclo...')\\n#11 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Repair\\\/Apps.php\",\"Line\":219}"}

This is repeating over and over

After more experimentation I deleted my containers, and performed a fresh install.
And, surprise ! It didn’t work either with the same error.
I tried again with version 10.5 and it didn’t work.
I could finally perform the update using 10.4.
As 10.5 and 10.6 are very new for armv7, my guess is that there is a configuration/permissions error in the two images.
How could I check that ?

So your docker container failed while executing the following script:

Not sure why yet, but I think that’s a good start?

EDIT: wrong link

1 Like

Maybe the user calling that script is the wrong one :man_shrugging:
I guess that it should be www-data but how can I check this ?

Forgot to say: if you are still able to reproduce the issue, perhaps it would be worth to open a github ticket.
I can try to get the right people to have a look at it.

1 Like

Thank you for your help, I opened and issue on owncloud-docker/server

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.