mirror of
https://github.com/nextcloud/documentation.git
synced 2025-10-26 11:18:02 +00:00
feat(adminmanual): Document how to use occ with sudo and env vars
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
6448739f01
commit
af604d1ea4
@ -161,6 +161,17 @@ This output option is available on all list and list-like commands:
|
||||
``status``, ``check``, ``app:list``, ``config:list``, ``encryption:status``
|
||||
and ``encryption:list-modules``
|
||||
|
||||
Environment variables
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``sudo`` does not forward environment variables by default. Put the variables before the ``php`` command::
|
||||
|
||||
sudo -u www-data NC_debug=true php occ status
|
||||
|
||||
Alternatively, you can ``export`` the variable or use the ``-E`` switch for ``sudo``::
|
||||
|
||||
NC_debug=true sudo -E -u www-data php occ status
|
||||
|
||||
Enabling autocompletion
|
||||
-----------------------
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user