@@ -138,7 +138,7 @@ This is how the command line based update would continue:
138138
139139.. code ::
140140
141- $ sudo -E - u www-data php ./occ upgrade
141+ $ sudo -u www-data php ./occ upgrade
142142 Nextcloud or one of the apps require upgrade - only a limited number of commands are available
143143 You may use your browser or the occ upgrade command to do the upgrade
144144 Set log level to debug
@@ -180,7 +180,7 @@ The steps are basically the same as for the web based updater:
1801802. Instead of clicking that button you can now invoke the command line based
181181 updater by going into the `updater/ ` directory in the Nextcloud directory
182182 and executing the `updater.phar ` as the web server user. (i.e.
183- ``sudo -E - u www-data php /var/www/nextcloud/updater/updater.phar ``)
183+ ``sudo -u www-data php /var/www/nextcloud/updater/updater.phar ``)
184184
185185.. image :: images/updater-cli-2-start-updater.png
186186 :alt: Terminal showing Nextcloud command line updater starting and displaying update information
@@ -233,7 +233,7 @@ except an error occurred during the ``occ upgrade`` or the replacement of the
233233code.
234234
235235To execute this, run the command with the ``--no-interaction `` option. (i.e.
236- ``sudo -E - u www-data php /var/www/nextcloud/updater/updater.phar --no-interaction ``)
236+ ``sudo -u www-data php /var/www/nextcloud/updater/updater.phar --no-interaction ``)
237237
238238.. image :: images/updater-cli-8-no-interaction.png
239239 :alt: Terminal showing Nextcloud command line updater running in non-interactive batch mode
@@ -264,7 +264,7 @@ Point the updater at any HTTP/HTTPS URL:
264264
265265.. code-block :: bash
266266
267- sudo -E - u www-data php /var/www/nextcloud/updater/updater.phar \
267+ sudo -u www-data php /var/www/nextcloud/updater/updater.phar \
268268 --url https://download.nextcloud.com/server/releases/nextcloud-33.0.0.zip
269269
270270
@@ -274,7 +274,7 @@ For a locally staged archive, use a ``file://`` URL:
274274
275275.. code-block :: bash
276276
277- sudo -E - u www-data php /var/www/nextcloud/updater/updater.phar \
277+ sudo -u www-data php /var/www/nextcloud/updater/updater.phar \
278278 --url file:///tmp/nextcloud-33.0.0.zip
279279
280280 Signature verification
@@ -290,31 +290,38 @@ automatically. You have two options:
290290
291291 .. code-block :: bash
292292
293- sudo -E - u www-data php /var/www/nextcloud/updater/updater.phar \
293+ sudo -u www-data php /var/www/nextcloud/updater/updater.phar \
294294 --url file:///tmp/nextcloud-33.0.0.zip \
295295 --signature " BASE64_SIGNATURE_HERE"
296296
297297 * **Skip verification ** — pass ``--no-verify `` to disable integrity checking
298- entirely. Only do this if you fully trust the source of the archive and the
299- transfer channel:
298+ entirely. Only do this if you fully trust the source and transfer channel,
299+ or if you have already verified the archive yourself (e.g. by checking the
300+ SHA-512 checksum):
300301
301302 .. code-block :: bash
302303
303- sudo -E -u www-data php /var/www/nextcloud/updater/updater.phar \
304+ sha512sum -c nextcloud-33.0.0.zip.sha512
305+
306+ Then run the updater without signature checking:
307+
308+ .. code-block :: bash
309+
310+ sudo -u www-data php /var/www/nextcloud/updater/updater.phar \
304311 --url file:///tmp/nextcloud-33.0.0.zip \
305312 --no-verify
306313
307- .. warning ::
308- Skipping signature verification ( ``--no-verify ``) removes the integrity
309- check that protects against corrupted or tampered archives. Only use it
310- when the archive comes from a fully trusted, controlled source .
314+ .. warning ::
315+ ``--no-verify `` removes the integrity check that protects against
316+ corrupted or tampered archives. Always verify the archive through an
317+ independent channel before using this option .
311318
312319These options can be combined with ``--no-interaction `` for fully automated
313320runs:
314321
315322.. code-block :: bash
316323
317- sudo -E - u www-data php /var/www/nextcloud/updater/updater.phar \
324+ sudo -u www-data php /var/www/nextcloud/updater/updater.phar \
318325 --url file:///tmp/nextcloud-33.0.0.zip \
319326 --signature " BASE64_SIGNATURE_HERE" \
320327 --no-interaction
0 commit comments