-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing web user permission #5629
Conversation
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
@@ -243,7 +243,7 @@ If there are any issues, correct them now before moving on. | |||
$ rm -rf app/cache/* | |||
$ rm -rf app/logs/* | |||
|
|||
$ HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1` | |||
$ 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` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to use --format
which is imho more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i didn't find any --format
options for the ps command except the o
flag which allow me to specify the information I want to display
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--format
isn't available on the mac version of ps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for investigating @BenoitLeveque. I only checked on a Ubuntu machine and thought that --format
was available everywhere.
👍 |
1 similar comment
+1 |
Nice fix! Thanks Benoît. |
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
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