You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: fix stale and inaccurate occ command documentation
- Rename "Run occ as your HTTP user" to "Running occ" with explanation
of why the HTTP user is needed
- Rename "Run commands in maintenance mode" to "Limitations in
maintenance mode" to accurately reflect the section content
- Fix environment variables section: both examples were identical,
now shows inline variable and export as separate approaches
- Update background jobs: cron is the primary command, list all three
modes in the command listing
- Remove db:generate-change-script (removed from server in
nextcloud/server#5772)
- Add note that antivirus commands require the files_antivirus app
AI-Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
Copy file name to clipboardExpand all lines: admin_manual/occ_command.rst
+23-17Lines changed: 23 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,8 +52,11 @@ occ command Directory
52
52
53
53
.. _http_user_label:
54
54
55
-
Run occ as your HTTP user
56
-
-------------------------
55
+
Running occ
56
+
-----------
57
+
58
+
You must run ``occ`` as your HTTP user so that the file ownership and permissions
59
+
on your Nextcloud data directory stay consistent with the web server.
57
60
58
61
The HTTP user is different on the various Linux distributions:
59
62
@@ -170,13 +173,15 @@ and ``encryption:list-modules``
170
173
Environment variables
171
174
^^^^^^^^^^^^^^^^^^^^^
172
175
173
-
``sudo`` does not forward environment variables by default. Put the variables before the ``php`` command::
176
+
``sudo`` does not forward environment variables by default. You can prepend the
177
+
variable and use the ``-E`` switch to pass it through::
174
178
175
179
NC_debug=true sudo -E -u www-data php occ status
176
180
177
-
Alternatively, you can ``export`` the variable or use the ``-E`` switch for ``sudo``::
181
+
Alternatively, ``export`` the variable first::
178
182
179
-
NC_debug=true sudo -E -u www-data php occ status
183
+
export NC_debug=true
184
+
sudo -E -u www-data php occ status
180
185
181
186
Enabling autocompletion
182
187
-----------------------
@@ -206,7 +211,7 @@ shell's profile (eg. ``~/.bash_profile`` or ``~/.zshrc``).
206
211
207
212
.. _run_commands_in_maintenance_mode:
208
213
209
-
Run commands in maintenance mode
214
+
Limitations in maintenance mode
210
215
--------------------------------
211
216
212
217
In maintenance mode, apps are not loaded [1]_, so commands from apps are unavailable. Commands integrated into Nextcloud server are available in maintenance mode.
@@ -323,23 +328,23 @@ To update an app to an unstable release, for instance News::
323
328
Background jobs selector
324
329
------------------------
325
330
326
-
Use the ``background`` command to select which scheduler you want to use for
327
-
controlling background jobs, Ajax, Webcron, or Cron. This is the same as using
331
+
Use the ``background`` commands to select which scheduler you want to use for
332
+
controlling background jobs. This is the same as using
328
333
the **Cron** section on your Nextcloud Admin page::
329
334
330
335
background
331
-
background:ajaxUse ajax to run background jobs
332
-
background:cronUse cron to run background jobs
333
-
background:webcron Use webcron to run background jobs
336
+
background:cronSet background jobs to cron mode
337
+
background:ajaxSet background jobs to ajax mode
338
+
background:webcron Set background jobs to webcron mode
334
339
335
-
This example selects Ajax::
340
+
Example::
336
341
337
-
sudo -E -u www-data php occ background:ajax
338
-
Set mode for background jobs to 'ajax'
342
+
sudo -E -u www-data php occ background:cron
343
+
Set mode for background jobs to 'cron'
339
344
340
345
The other two commands are:
341
346
342
-
* ``background:cron``
347
+
* ``background:ajax``
343
348
* ``background:webcron``
344
349
345
350
See :doc:`configuration_server/background_jobs_configuration` to learn more.
@@ -796,8 +801,6 @@ convert from SQLite to one of these other databases.
796
801
db
797
802
db:convert-type Convert the Nextcloud database to the newly
798
803
configured one
799
-
db:generate-change-script generates the change script from the current
800
-
connected db to db_structure.xml
801
804
802
805
You need:
803
806
@@ -2245,6 +2248,9 @@ invisible No No
2245
2248
Antivirus
2246
2249
---------
2247
2250
2251
+
.. note::
2252
+
These commands require the `files_antivirus <https://apps.nextcloud.com/apps/files_antivirus>`_ app to be installed and enabled.
0 commit comments