summaryrefslogtreecommitdiff
path: root/vendor/CherryPy-3.2.0/sphinx/source/refman/process/plugins/dropprivileges.rst
blob: daaa1efc7c0ea9ad991b2dd4e8557cf84e140768 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
***************
Drop privileges
***************

Use this :ref:`Engine Plugin<plugins>` to start your
CherryPy site as root (for example, to listen on a privileged port like 80)
and then reduce privileges to something more restricted.

This priority of this plugin's "start" listener is slightly higher than the
priority for ``server.start`` in order to facilitate the most common use:
starting on a low port (which requires root) and then dropping to another user.

Example::

    DropPrivileges(cherrypy.engine, '/var/run/myapp.pid').subscribe()

.. currentmodule:: cherrypy.process.plugins

Classes
=======

.. autoclass:: DropPrivileges
   :members:
   :show-inheritance: