Skip to content

Commit b39fa66

Browse files
committed
bug #5629 Fixing web user permission (BenoitLeveque)
This PR was merged into the 2.3 branch. Discussion ---------- Fixing web user permission If you have another web server like tomcat on your server, the previous command end up returning tomcat instead of apache. Previously we looked at the whole line, now only at the user and the command name Commits ------- 78ce3e9 Fix the way we found the apache/nginx user
2 parents 6df8cf7 + 78ce3e9 commit b39fa66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/installation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ If there are any issues, correct them now before moving on.
239239
$ rm -rf app/cache/*
240240
$ rm -rf app/logs/*
241241
242-
$ HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
242+
$ 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`
243243
$ sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
244244
$ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
245245
@@ -254,7 +254,7 @@ If there are any issues, correct them now before moving on.
254254

255255
.. code-block:: bash
256256
257-
$ HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
257+
$ 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`
258258
$ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
259259
$ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
260260

0 commit comments

Comments
 (0)