Merge pull request #12212 from nextcloud/enh/improve-occ-documentation

Improve occ documentation
This commit is contained in:
Côme Chilliet
2024-09-17 19:23:55 +02:00
committed by GitHub
13 changed files with 52 additions and 31 deletions

View File

@@ -159,6 +159,6 @@ changed remotely (files changed without going through Nextcloud), especially
when it's very deep in the folder hierarchy of the external storage.
You might need to setup a cron job that runs ``sudo -u www-data php occ files:scan --all``
(or replace ``--all`` with the user name, see also :doc:`../configuration_server/occ_command`)
(or replace ``--all`` with the user name, see also :doc:`../occ_command`)
to trigger a rescan of the user's files periodically (for example every 15 minutes), which includes
the mounted external storage.

View File

@@ -172,7 +172,7 @@ Trashbin contents are not transferred::
occ files:transfer-ownership user1 user2
(See :doc:`../configuration_server/occ_command` for a complete ``occ``
(See :doc:`../occ_command` for a complete ``occ``
reference.)
Users may also transfer files or folders selectively by themselves.

View File

@@ -25,7 +25,7 @@ Ubuntu Linux::
# you may also need to update the mimetype for existing files, see nextcloud/server#30566
$ sudo -u www-data php occ maintenance:mimetype:update-db --repair-filecache
See :doc:`../configuration_server/occ_command` to learn more about ``occ``.
See :doc:`../occ_command` to learn more about ``occ``.
Some common mimetypes that may be useful in creating aliases are:

View File

@@ -7,6 +7,5 @@ Nextcloud configuration
:glob:
security_setup_warnings
occ_command
config_sample_php_parameters
*

View File

@@ -27,7 +27,7 @@ Basic settings under the Administration settings section.
occ config:app:set settings profile_enabled_by_default --value="0"
Please refer to :doc:`../configuration_server/occ_command` for all available
Please refer to :doc:`../occ_command` for all available
``occ`` commands.
To disable profile globally add the following line to your ``config.php``

View File

@@ -12,7 +12,7 @@ The normal ways to recover a lost password are:
2. Ask another Nextcloud server admin to reset it for you.
If neither of these is an option, then you have a third option, and that is
using the ``occ`` command. See :doc:`../configuration_server/occ_command` to
using the ``occ`` command. See :doc:`../occ_command` to
learn more about using the ``occ`` command.
::

View File

@@ -42,7 +42,7 @@ There are two ``occ`` commands to use for examining a table of users marked as
deleted, and then manually deleting them. The ``occ`` command is in your
Nextcloud directory, for example ``/var/www/nextcloud/occ``, and it must be run as
your HTTP user. To learn more about ``occ``, see
:doc:`../configuration_server/occ_command`.
:doc:`../occ_command`.
These examples are for Ubuntu Linux:

View File

@@ -10,6 +10,7 @@ Table of contents
release_schedule
installation/index
configuration_server/index
occ_command
apps_management
configuration_user/index
configuration_files/index

View File

@@ -46,7 +46,7 @@ Contacts that have a birthday date filled are automatically added as events to a
If you deactivate this option, all users will no longer have this calendar.
When activating this option, users birthday calendars won't be available right away because they need to be generated
by a background task. See :doc:`../configuration_server/occ_command` section DAV commands.
by a background task. See :doc:`../occ_command` section DAV commands.
Reminder notifications
----------------------
@@ -67,7 +67,7 @@ more often than the standard ``cron`` system::
# crontab -u www-data -e
*/5 * * * * php -f /var/www/nextcloud/occ dav:send-event-reminders
See :doc:`../configuration_server/occ_command` section Dav commands.
See :doc:`../occ_command` section Dav commands.
You'll also need to change the sending mode from ``background-job`` to ``occ``::

View File

@@ -176,7 +176,7 @@ Rescans are triggered at installation, and by updates. You may run scans manuall
occ integrity:check-core
occ integrity:check-app $appid
See :doc:`../configuration_server/occ_command` to learn more about using ``occ``.
See :doc:`../occ_command` to learn more about using ``occ``.
Errors
------

View File

@@ -102,7 +102,7 @@ Maintenance mode
You can put your Nextcloud server into maintenance mode before performing
upgrades, or for performing troubleshooting or maintenance. Please see
:doc:`../configuration_server/occ_command` to learn how to put your server into
:doc:`../occ_command` to learn how to put your server into
the maintenance mode (``maintenance:mode``) or execute repair commands
(``maintenance:repair``) with the ``occ`` command.

View File

@@ -325,7 +325,7 @@ The other two commands are:
* ``background:cron``
* ``background:webcron``
See :doc:`background_jobs_configuration` to learn more.
See :doc:`configuration_server/background_jobs_configuration` to learn more.
.. _config_commands_label:
@@ -1178,7 +1178,7 @@ Security
--------
Use these commands to manage server-wide security related parameters. Currently this
includes :doc:`bruteforce_configuration` and SSL certificates (the latter are useful when
includes :doc:`configuration_server/bruteforce_configuration` and SSL certificates (the latter are useful when
creating federation connections with other Nextcloud servers that use self-signed certificates::
security
@@ -1359,6 +1359,9 @@ report showing how many users you have, and when a user was last logged in::
the stored private key
user:add
^^^^^^^^
You can create a new user with their display name, login name, and any group
memberships with the ``user:add`` command. The syntax is::
@@ -1398,21 +1401,6 @@ Jones::
Display name set to "Fred Jones"
User "fred" added to group "users"
You can reset any user's password, including administrators (see
:doc:`../configuration_user/reset_admin_password`)::
sudo -u www-data php occ user:resetpassword layla
Enter a new password:
Confirm the new password:
Successfully reset password for layla
You may also use ``password-from-env`` to reset passwords::
export OC_PASS=newpassword
su -s /bin/sh www-data -c 'php occ user:resetpassword --password-from-env
layla'
Successfully reset password for layla
``generate-password`` allows you to set a securely generated password for the user.
This is never shown in the output and can be used to create users with temporary
passwords. This can be used in conjunction with the ``email`` option to create
@@ -1433,10 +1421,34 @@ the user. A welcome email will be sent to the user's email address if
The account "layla" was created successfully
Welcome email sent to layla@example.tld
user:resetpassword
^^^^^^^^^^^^^^^^^^
You can reset any user's password, including administrators (see
:doc:`../configuration_user/reset_admin_password`)::
sudo -u www-data php occ user:resetpassword layla
Enter a new password:
Confirm the new password:
Successfully reset password for layla
You may also use ``password-from-env`` to reset passwords::
export OC_PASS=newpassword
su -s /bin/sh www-data -c 'php occ user:resetpassword --password-from-env
layla'
Successfully reset password for layla
user:delete
^^^^^^^^^^^
You can delete users::
sudo -u www-data php occ user:delete fred
user:lastseen
^^^^^^^^^^^^^
View a specific user's most recent login::
sudo -u www-data php occ user:lastseen layla
@@ -1450,7 +1462,8 @@ View a list of all users' most recent login::
layla's last login: 2024-03-20 17:18
stephanie's last login: 2024-01-11 13:26
user:setting
^^^^^^^^^^^^
Read user settings::
@@ -1481,6 +1494,9 @@ Delete a setting::
sudo -u www-data php occ user:setting layla settings email --delete
user:report
^^^^^^^^^^^
Generate a simple report that counts all users, including users on external user
authentication servers such as LDAP::
@@ -1505,6 +1521,11 @@ There might be a discrepancy between the total number of users compared to the n
Users that have never logged in before are not counted as active or disabled users.
Some user backends also do not allow a count for the number of users.
user:list
^^^^^^^^^
You can use the command ``user:list`` to list users. By default it will limit the output to 500 users but you can override that with options ``--limit`` and ``--offset``. Use ``--disabled`` to only list disabled users.
.. _group_commands_label:
Group commands

View File

@@ -34,7 +34,7 @@ How can encryption be disabled?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The only way to disable encryption is to run the `"decrypt all"
<https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#encryption-label>`_
<https://docs.nextcloud.com/server/latest/admin_manual/occ_command.html#encryption-label>`_
script, which decrypts all files and disables encryption.
.. TODO ON RELEASE: Update version number above on release
@@ -44,7 +44,7 @@ Is it possible to disable encryption with the recovery key?
Yes, *if* every user uses the `file recovery key
<https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/encryption_configuration.html#enabling-users-file-recovery-keys>`_, `"decrypt all"
<https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#encryption-label>`_ will use it to decrypt all files.
<https://docs.nextcloud.com/server/latest/admin_manual/occ_command.html#encryption-label>`_ will use it to decrypt all files.
.. TODO ON RELEASE: Update version number above on release