Avoid running Mayan as root
This change avoid creating a lock file in the /tmp folder that is owned by the root user. Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -158,9 +158,9 @@ For another setup that offers more performance and scalability refer to the
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo mayan MAYAN_DATABASES="{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'127.0.0.1'}}" \
|
sudo -u mayan MAYAN_DATABASES="{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'127.0.0.1'}}" \
|
||||||
MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \
|
MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \
|
||||||
|MAYAN_BIN| platformtemplate supervisord > |MAYAN_SUPERVISOR_CONF|
|
|MAYAN_BIN| platformtemplate supervisord | sudo sh -c "cat > |MAYAN_SUPERVISOR_CONF|"
|
||||||
|
|
||||||
|
|
||||||
#. Configure Redis:
|
#. Configure Redis:
|
||||||
|
|||||||
@@ -128,18 +128,18 @@ Upgrade steps from any previous version of Mayan EDMS
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo sh -c "MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \
|
sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \
|
||||||
MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan \
|
MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan \
|
||||||
MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \
|
MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \
|
||||||
|MAYAN_BIN| platformtemplate supervisord > |MAYAN_SUPERVISOR_CONF|"
|
|MAYAN_BIN| platformtemplate supervisord | sudo sh -c "cat > |MAYAN_SUPERVISOR_CONF|"
|
||||||
|
|
||||||
or:
|
or:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo sh -c "MAYAN_DATABASES=\"{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'127.0.0.1'}}\" \
|
sudo -u mayan MAYAN_DATABASES=\"{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'127.0.0.1'}}\" \
|
||||||
MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \
|
MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \
|
||||||
|MAYAN_BIN| platformtemplate supervisord > |MAYAN_SUPERVISOR_CONF|"
|
|MAYAN_BIN| platformtemplate supervisord | sudo sh -c "cat > |MAYAN_SUPERVISOR_CONF|"
|
||||||
|
|
||||||
|
|
||||||
#. Edit the supervisord configuration file and update any setting specific to your installation:
|
#. Edit the supervisord configuration file and update any setting specific to your installation:
|
||||||
|
|||||||
Reference in New Issue
Block a user