Skip to content

Commit 4194527

Browse files
committed
Improved "Setting up Permissions"
Signed-off-by: Manuel Reinhard <manu@sprain.ch>
1 parent 3b9441c commit 4194527

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

book/installation.rst

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,26 @@ If there are any issues, correct them now before moving on.
117117
must be writable both by the web server and the command line user. On
118118
a UNIX system, if your web server user is different from your command
119119
line user, you can run the following commands just once in your project
120-
to ensure that permissions will be setup properly. Change ``www-data``
121-
to your web server user:
120+
to ensure that permissions will be setup properly.
121+
122+
Note that not all web servers run as the user ``www-data`` as in the examples
123+
below. You have to check which user the web server is being run as and put it
124+
in for ``www-data``. This can be done by checking your process list to see
125+
which user is running your web server processes.
126+
127+
Depending on your system this may easily be accomplished with one of the
128+
follwing commands:
129+
130+
.. code-block:: bash
131+
132+
$ ps aux | grep httpd
133+
134+
or
135+
136+
.. code-block:: bash
137+
138+
$ ps aux | grep apache
139+
122140
123141
**1. Using ACL on a system that supports chmod +a**
124142

@@ -132,7 +150,7 @@ If there are any issues, correct them now before moving on.
132150
133151
$ sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
134152
$ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
135-
153+
136154
**2. Using Acl on a system that does not support chmod +a**
137155

138156
Some systems don't support ``chmod +a``, but do support another utility
@@ -145,11 +163,6 @@ If there are any issues, correct them now before moving on.
145163
$ sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
146164
$ sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
147165
148-
Note that not all web servers run as the user ``www-data``. You have to
149-
check which user the web server is being run as and put it in for ``www-data``.
150-
This can be done by checking your process list to see which user is running
151-
your web server processes.
152-
153166
**3. Without using ACL**
154167

155168
If you don't have access to changing the ACL of the directories, you will

0 commit comments

Comments
 (0)