Skip to content

Commit f18a1aa

Browse files
committed
Update directory permissions to make var/ writable
Simplifies the directory permission commands to make sure: - session folder is writable - other custom var/ sub folders are writeable, typically data / storage / upload folder needed cms/crm/ecommerce/pim/.. systems built on top of symfony, avoiding that these projects needs to have own conflicting documentation on this Closes #6132
1 parent 2db6e18 commit f18a1aa

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

book/installation.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ If there are any issues, correct them now before moving on.
220220

221221
.. sidebar:: Setting up Permissions
222222

223-
One common issue when installing Symfony is that the ``var/cache`` and
224-
``var/logs`` directories must be writable both by the web server and the
225-
command line user. On a UNIX system, if your web server user is different
223+
One common issue when installing Symfony is that the ``var/cache``, ``var/logs``
224+
and ``var/sessions`` directories must be writable both by the web server and
225+
the command line user. On a UNIX system, if your web server user is different
226226
from your command line user, you can try one of the following solutions.
227227

228228
**1. Use the same user for the CLI and the web server**
@@ -242,12 +242,11 @@ If there are any issues, correct them now before moving on.
242242

243243
.. code-block:: bash
244244
245-
$ rm -rf var/cache/*
246-
$ rm -rf var/logs/*
245+
$ rm -rf var/cache/* var/logs/* var/sessions/*
247246
248247
$ HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
249-
$ sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" var/cache var/logs
250-
$ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" var/cache var/logs
248+
$ sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" var
249+
$ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" var
251250
252251
253252
**3. Using ACL on a system that does not support chmod +a**
@@ -261,8 +260,8 @@ If there are any issues, correct them now before moving on.
261260
.. code-block:: bash
262261
263262
$ HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
264-
$ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs
265-
$ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs
263+
$ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var
264+
$ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var
266265
267266
If this doesn't work, try adding ``-n`` option.
268267

0 commit comments

Comments
 (0)