Skip to content
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

Merged
merged 1 commit into from
Sep 30, 2015
Merged

Fixing web user permission #5629

merged 1 commit into from
Sep 30, 2015

Conversation

BenoitLeveque
Copy link
Contributor

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

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
@BenoitLeveque BenoitLeveque changed the title Fix the way we found the apache/nginx user Fixing web user permission Aug 17, 2015
@@ -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`
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Member

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.

@xabbuh
Copy link
Member

xabbuh commented Aug 18, 2015

👍

1 similar comment
@wouterj
Copy link
Member

wouterj commented Sep 30, 2015

+1

@wouterj
Copy link
Member

wouterj commented Sep 30, 2015

Nice fix! Thanks Benoît.

@wouterj wouterj merged commit 78ce3e9 into symfony:2.3 Sep 30, 2015
wouterj added a commit that referenced this pull request Sep 30, 2015
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
@BenoitLeveque BenoitLeveque deleted the patch-1 branch September 30, 2015 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants