OwnCloud Update 10.0.5

De EjnTricks
Révision de 22 décembre 2019 à 15:38 par Etienne (discussion | contributions)

(diff) ← Version précédente | Voir la version courante (diff) | Version suivante → (diff)

Cet article présente la mise à jour de OwnCloud en version 10.0.5.

Dans le cadre de cet article, la mise à jour est effectuée manuellement avec le même principe que pour l'installation initiale. Théoriquement, la mise à jour est simple. Cependant il est nécessaire de n'oublier aucune étape.


Hand-icon.png Votre avis

Nobody voted on this yet

 You need to enable JavaScript to vote


Download-icon.png Téléchargement

L'application est téléchargée dans le répertoire /var/opt/owncloud.


System-Install-icon.png Installation

L'application va être installée sous /var/opt/owncloud, avec modification de l'emplacement racine pour être 10.0.5.

#sudo tar --transform 's/^owncloud/10.0.5/' -C /var/opt/owncloud -xjvf /var/opt/owncloud/owncloud-10.0.5.tar.bz2

Le fichier téléchargé peut être supprimé.

#sudo rm /var/opt/owncloud/owncloud-10.0.5.tar.bz2


Icon File Owner.png Propriétaire fichiers

L'installation a été réalisée avec le compte root. Il est préférable de donner la propriété au compte de démarrage du serveur web, soit www-data dans le cadre de cette installation.

#sudo chown -R www-data:www-data /var/opt/owncloud/10.0.5


Icon ACL.png Sécurisation

Après avoir modifié le propriétaire des fichiers, il est conseillé de positionner des droits restrictifs afin que seul le propriétaire puisse accéder à ceux-ci.

#sudo chmod -R go-rwx /var/opt/owncloud/10.0.5


Icon-Configuration-Settings.png Configurations complémentaires

Process-icon.png Fichier de configuration

OwnCloud est configuré avec le fichier config/config.php dans le répertoire d'installation. Celui-ci a été externalisé sous /var/opt/owncloud/common/config. Le lien doit être mis en place pour la nouvelle instance.

#sudo rm -rf /var/opt/owncloud/10.0.5/config
#sudo ln -s /var/opt/owncloud/common/config /var/opt/owncloud/10.0.5/config
#sudo chown -h www-data:www-data /var/opt/owncloud/10.0.5/config

Plugin-icon.png Emplacements applications tierces

Sur la documentation officielle, il est recommandé de démarrer la nouvelle version sans les applications tierces activées. Cependant dans le cadre de cette mise à jour, elles sont référencées tout de suite.

Les applications tierces sont externalisées afin de ne pas avoir à les recopier dans le répertoire de l'instance à chaque montée de version, comme décrit dans l'article d'ajout d'applications.

Le répertoire /var/opt/owncloud/common/apps-enabled est utilisé pour référencer les applications mises à dispositions, comme décrit dans le paragraphe d'activation des applications tierces.

#sudo ln -s /var/opt/owncloud/common/apps-enabled /var/opt/owncloud/10.0.5/exapps
#sudo chown -h www-data:www-data /var/opt/owncloud/10.0.5/exapps


Run-icon.png Activation

Robot-icon.png Mode maintenance

Dans la documentation officielle, il est recommandé de passer en mode maintenance durant la mise à jour. Ceci peut s'effectuer à l'aide de la commande occ.

#sudo -u www-data php /var/opt/owncloud/installed/occ maintenance:mode --on

Cette commande entraîne la modification du fichier config.php, emplacement /var/opt/owncloud/common/config/config.php dans le cadre de cette installation, en ajoutant la configuration suivante.

 'maintenance' => true

Cette modification peut également être réalisée manuellement.

Une fois le mode activé, il n'est plus possible de se connecter à l'application. Un message est présenté aux utilisateurs indiquant que le site est en maintenance.


Une fois l'installation terminée, il faut désactiver le mode en positionnant la valeur à false sur maintenance. Cependant, dans le cadre de cette mise à jour, cette étape n'est pas nécessaire. En effet, l'activation sera réalisée en modifiant le lien mis à disposition pour Apache.

Configuration-icon.png Publication sous Apache

Lors de l'installation initiale, la publication sous Apache pointait sur le lien /var/opt/owncloud/installed. Ce principe permet d'activer la nouvelle version rapidement, sans toucher au paramétrage de Apache. Il est juste nécessaire de modifier le répertoire pointé par le lien.

#sudo rm /var/opt/owncloud/installed
#sudo ln -s /var/opt/owncloud/10.0.5 /var/opt/owncloud/installed
#sudo chown -h www-data:www-data /var/opt/owncloud/installed

Lors du premier accès après installation de la nouvelle version, l'utilisateur est informé de la nécessité de mettre à jour la base de données.


Cependant, l'installation en cours est trop volumineuse pour être mise à jour depuis l'interface. Ceci doit être réalisé en ligne de commande comme indiqué dans procédure officielle

#sudo -u www-data php /var/opt/owncloud/installed/occ upgrade
ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
2018-03-26T17:46:50+00:00 Set log level to debug
2018-03-26T17:46:50+00:00 Turned on maintenance mode
2018-03-26T17:46:50+00:00 Repair step: Repair MySQL database engine
2018-03-26T17:46:50+00:00 Repair step: Repair MySQL collation
2018-03-26T17:46:50+00:00 Repair info: All tables already have the correct collation -> nothing to do
2018-03-26T17:46:50+00:00 Repair step: Repair SQLite autoincrement
2018-03-26T17:46:50+00:00 Repair step: Repair duplicate entries in oc_lucene_status
2018-03-26T17:46:50+00:00 Repair info: lucene_status table does not exist -> nothing to do
2018-03-26T17:46:50+00:00 Repair step: Upgrade app code from the marketplace
2018-03-26T17:46:50+00:00 Repair info: Using market to update existing apps
2018-03-26T17:46:50+00:00 Repair info: Attempting to update the following missing apps from market: activity, files_pdfviewer, files_texteditor, gallery, user_ldap
2018-03-26T17:46:50+00:00 Repair info: Fetching app from market: activity
2018-03-26T17:46:55+00:00 Repair info: Fetching app from market: files_pdfviewer
2018-03-26T17:46:59+00:00 Repair info: Fetching app from market: files_texteditor
2018-03-26T17:47:04+00:00 Repair info: Fetching app from market: gallery
2018-03-26T17:47:07+00:00 Repair info: Fetching app from market: user_ldap
2018-03-26T17:47:10+00:00 Repair info: Attempting to update the following existing compatible apps from market: activity, files_pdfviewer, files_texteditor, gallery, user_ldap
2018-03-26T17:47:10+00:00 Repair info: Fetching app from market: comments
2018-03-26T17:47:11+00:00 Repair info: App (comments) is not known at the marketplace.
2018-03-26T17:47:11+00:00 Repair info: Fetching app from market: configreport
2018-03-26T17:47:11+00:00 Repair info: App (configreport) is not known at the marketplace.
2018-03-26T17:47:11+00:00 Repair info: Fetching app from market: dashboard
2018-03-26T17:47:12+00:00 Repair info: App (dashboard) is not known at the marketplace.
2018-03-26T17:47:12+00:00 Repair info: Fetching app from market: dav
2018-03-26T17:47:13+00:00 Repair info: App (dav) is not known at the marketplace.
2018-03-26T17:47:13+00:00 Repair info: Fetching app from market: delete_confirmation
2018-03-26T17:47:14+00:00 Repair info: App (delete_confirmation) is not known at the marketplace.
2018-03-26T17:47:14+00:00 Repair info: Fetching app from market: external
2018-03-26T17:47:14+00:00 Repair info: App (external) is not known at the marketplace.
2018-03-26T17:47:14+00:00 Repair info: Fetching app from market: federatedfilesharing
2018-03-26T17:47:15+00:00 Repair info: App (federatedfilesharing) is not known at the marketplace.
2018-03-26T17:47:15+00:00 Repair info: Fetching app from market: federation
2018-03-26T17:47:16+00:00 Repair info: App (federation) is not known at the marketplace.
2018-03-26T17:47:16+00:00 Repair info: Fetching app from market: files
2018-03-26T17:47:17+00:00 Repair info: App (files) is not known at the marketplace.
2018-03-26T17:47:17+00:00 Repair info: Fetching app from market: files_clipboard
2018-03-26T17:47:19+00:00 Repair info: Fetching app from market: files_external
2018-03-26T17:47:20+00:00 Repair info: App (files_external) is not known at the marketplace.
2018-03-26T17:47:20+00:00 Repair info: Fetching app from market: files_external_ftp
2018-03-26T17:47:21+00:00 Repair info:
2018-03-26T17:47:21+00:00 Repair info: Fetching app from market: files_gpxviewer_extended
2018-03-26T17:47:21+00:00 Repair info: App (files_gpxviewer_extended) is not known at the marketplace.
2018-03-26T17:47:21+00:00 Repair info: Fetching app from market: files_mv
2018-03-26T17:47:22+00:00 Repair info: App (files_mv) is not known at the marketplace.
2018-03-26T17:47:22+00:00 Repair info: Fetching app from market: files_sharing
2018-03-26T17:47:23+00:00 Repair info: App (files_sharing) is not known at the marketplace.
2018-03-26T17:47:23+00:00 Repair info: Fetching app from market: files_trashbin
2018-03-26T17:47:24+00:00 Repair info: App (files_trashbin) is not known at the marketplace.
2018-03-26T17:47:24+00:00 Repair info: Fetching app from market: files_versions
2018-03-26T17:47:24+00:00 Repair info: App (files_versions) is not known at the marketplace.
2018-03-26T17:47:24+00:00 Repair info: Fetching app from market: files_videoplayer
2018-03-26T17:47:25+00:00 Repair info: App (files_videoplayer) is not known at the marketplace.
2018-03-26T17:47:25+00:00 Repair info: Fetching app from market: firstrunwizard
2018-03-26T17:47:25+00:00 Repair info: App (firstrunwizard) is not known at the marketplace.
2018-03-26T17:47:25+00:00 Repair info: Fetching app from market: market
2018-03-26T17:47:26+00:00 Repair info:
2018-03-26T17:47:26+00:00 Repair info: Fetching app from market: notifications
2018-03-26T17:47:27+00:00 Repair info: App (notifications) is not known at the marketplace.
2018-03-26T17:47:27+00:00 Repair info: Fetching app from market: provisioning_api
2018-03-26T17:47:27+00:00 Repair info: App (provisioning_api) is not known at the marketplace.
2018-03-26T17:47:27+00:00 Repair info: Fetching app from market: systemtags
2018-03-26T17:47:28+00:00 Repair info: App (systemtags) is not known at the marketplace.
2018-03-26T17:47:28+00:00 Repair info: Fetching app from market: templateeditor
2018-03-26T17:47:29+00:00 Repair info: App (templateeditor) is not known at the marketplace.
2018-03-26T17:47:29+00:00 Repair info: Fetching app from market: updatenotification
2018-03-26T17:47:29+00:00 Repair info: App (updatenotification) is not known at the marketplace.
2018-03-26T17:47:29+00:00 Repair info: Fetching app from market: user_external
2018-03-26T17:47:30+00:00 Repair info: App (user_external) is not known at the marketplace.
2018-03-26T17:47:30+00:00 Repair info: App was not updated: comments
2018-03-26T17:47:30+00:00 Repair info: App was not updated: configreport
2018-03-26T17:47:30+00:00 Repair info: App was not updated: dashboard
2018-03-26T17:47:30+00:00 Repair info: App was not updated: dav
2018-03-26T17:47:30+00:00 Repair info: App was not updated: delete_confirmation
2018-03-26T17:47:30+00:00 Repair info: App was not updated: external
2018-03-26T17:47:30+00:00 Repair info: App was not updated: federatedfilesharing
2018-03-26T17:47:30+00:00 Repair info: App was not updated: federation
2018-03-26T17:47:30+00:00 Repair info: App was not updated: files
2018-03-26T17:47:30+00:00 Repair info: App was not updated: files_external
2018-03-26T17:47:30+00:00 Repair info: App was not updated: files_external_ftp
2018-03-26T17:47:30+00:00 Repair info: App was not updated: files_gpxviewer_extended
2018-03-26T17:47:30+00:00 Repair info: App was not updated: files_mv
2018-03-26T17:47:30+00:00 Repair info: App was not updated: files_sharing
2018-03-26T17:47:30+00:00 Repair info: App was not updated: files_trashbin
2018-03-26T17:47:30+00:00 Repair info: App was not updated: files_versions
2018-03-26T17:47:30+00:00 Repair info: App was not updated: files_videoplayer
2018-03-26T17:47:30+00:00 Repair info: App was not updated: firstrunwizard
2018-03-26T17:47:30+00:00 Repair info: App was not updated: market
2018-03-26T17:47:30+00:00 Repair info: App was not updated: notifications
2018-03-26T17:47:30+00:00 Repair info: App was not updated: provisioning_api
2018-03-26T17:47:30+00:00 Repair info: App was not updated: systemtags
2018-03-26T17:47:30+00:00 Repair info: App was not updated: templateeditor
2018-03-26T17:47:30+00:00 Repair info: App was not updated: updatenotification
2018-03-26T17:47:30+00:00 Repair info: App was not updated: user_external
2018-03-26T17:47:30+00:00 Updating database schema
2018-03-26T17:47:30+00:00 Updated database
2018-03-26T17:47:30+00:00 Updating <files_clipboard> ...
2018-03-26T17:47:30+00:00 Updated <files_clipboard> to 0.7.1
2018-03-26T17:47:30+00:00 Updating <templateeditor> ...
2018-03-26T17:47:30+00:00 Updated <templateeditor> to 0.2
2018-03-26T17:47:30+00:00 Repair step: Repair mime types
2018-03-26T17:47:30+00:00 Repair step: Detect file cache entries with path that does not match parent-child relationships
2018-03-26T17:47:30+00:00 Repair step: Generate ETags for file where no ETag is present.
2018-03-26T17:47:30+00:00 Repair info: ETags have been fixed for 0 files/folders.
2018-03-26T17:47:30+00:00 Repair step: Clean tags and favorites
2018-03-26T17:47:30+00:00 Repair info: 0 tags of deleted users have been removed.
2018-03-26T17:47:30+00:00 Repair info: 0 tags for delete files have been removed.
2018-03-26T17:47:30+00:00 Repair info: 0 tag entries for deleted tags have been removed.
2018-03-26T17:47:30+00:00 Repair info: 0 tags with no entries have been removed.
2018-03-26T17:47:30+00:00 Repair step: Drop old database tables
2018-03-26T17:47:30+00:00 Drop old database tables
2018-03-26T17:47:30+00:00
2018-03-26T17:47:30+00:00  Done
28/28 [============================] 100% 2018-03-26T17:47:30+00:00
2018-03-26T17:47:30+00:00 Repair step: Drop old background jobs
2018-03-26T17:47:30+00:00 Repair step: Remove getetag entries in properties table
2018-03-26T17:47:30+00:00 Repair info: Removed 0 unneeded "{DAV:}getetag" entries from properties table.
2018-03-26T17:47:30+00:00 Repair step: Repair outdated OCS IDs
2018-03-26T17:47:30+00:00 Repair step: Repair invalid shares
2018-03-26T17:47:30+00:00 Repair step: Remove old share propagation app entries
2018-03-26T17:47:30+00:00 Repair step: Move user avatars outside the homes to the new location
2018-03-26T17:47:30+00:00 Repair step: Remove shares of a users root folder
2018-03-26T17:47:30+00:00 Repair step: Repair unmerged shares
2018-03-26T17:47:30+00:00 Repair step: Disable extra themes
2018-03-26T17:47:30+00:00 Starting code integrity check...
2018-03-26T17:47:33+00:00 Finished code integrity check
2018-03-26T17:47:33+00:00 Update successful
2018-03-26T17:47:33+00:00 Turned off maintenance mode
2018-03-26T17:47:33+00:00 Reset log level


Plugin-icon.png Applications tierces

Copy-icon.png Déclaration types mimes

Dans le cadre de l'utilisation de l'application GPX Viewer, le type mime GPX doit être ajouté afin de déclencher les fonctionnalités. La référence vers le fichier est reproduite.

#sudo rm /var/opt/owncloud/installed/resources/config/mimetypemapping.dist.json
#sudo ln -s /var/opt/owncloud/common/resources/config/mimetypemapping.dist.json /var/opt/owncloud/installed/resources/config/mimetypemapping.dist.json
#sudo chown -h www-data:www-data /var/opt/owncloud/installed/resources/config/mimetypemapping.dist.json

Attention, suite à la mise à jour, les types mime des fichiers peuvent être modifiés et ne sont plus valides dans le cas des GPX. Si tel est le cas, il faut modifier la table oc_filecache comme explicité dans l'article suivant.

Icon ACL.png Sécurisation post install

Il se peut que des applications tierces soient mises à jour automatiquement. Dans ce cas, elles sont déployées dans le répertoires apps de l'instance mais avec les permissions par défaut, qi ne sont pas forcément celles mises en place, à savoir.

  • 700 pour les répertoires;
  • 600 pour les fichiers.

Il est donc préférable de relancer la mise à jour des droits.

#sudo chmod -R go-rwx /var/opt/owncloud/10.0.5/apps


Viewer icon.png Voir aussi

Documentation officielle: https://doc.owncloud.org/server/10.0/admin_manual/maintenance/upgrade.html


https://doc.owncloud.org/server/10.0/admin_manual/configuration_server/occ_command.html#command-line-upgrade