Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add another tip to setup permissions#3563

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
tony-co wants to merge4 commits intosymfony:2.4fromtony-co:patch-1

Conversation

tony-co
Copy link
Contributor

QA
Doc fix?no
New docs?yes
Applies toall
Fixed ticketsn/a

This is a quick tip on the installation guide to use the same user for CLI and HTTP.

| Q             | A| ------------- | ---| Doc fix?      | no| New docs?     | yes| Applies to    | all| Fixed tickets | n/a
typing commands when setting up new projects. This is done by editing your
Apache configuration file ``httpd.conf`` and update the user and group values
from ``www-data`` to your CLI user. Obviously, this is only recommended in dev
environnement.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

typo, it should say environment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

this is not needed for a development environment imo, i never do this for instance, i have never done it neither in ubuntu nor in mac

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@cordoval I agree this is not needed, it is just another option among others :)

@@ -267,6 +267,14 @@ If there are any issues, correct them now before moving on.

Note that using the ACL is recommended when you have access to them
on your server because changing the umask is not thread-safe.

**4. Use the same user for CLI and HTTP**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

... the CLI and the web server

@weaverryan
Copy link
Member

Hey Tony!

Sorry for spamming you with comments - but I like the addition - so let's get it merged in :).

Cheers!

@tony-co
Copy link
ContributorAuthor

Thanks@weaverryan for the comments, it's good spam anyway!
I made those changes, it's ready for merge.

@lyrixx
Copy link
Member

Fews issue:

  • Not everyone uses Apache2 (I use nginx + PHP-FPM for instance)

  • My Apache2 config is nothttpd.conf it'sapache2.conf (I also have Apache2)

  • Obviously, this is only recommended in development environment as you do not want to give Apache full control over your whole production system.

    Why did you said that? We are just talking about php file. All our infrasture a SensioLabs uses the same user for php-frpm and the CLI. Everything ismuch more simple. For exemple, we have aninsight user. the FPM pool run with theinsight user, all crons, workers uses also this user. And when we connect (ssh) to a server, we use theinsight user. So for me, this sentence is very wrong and useless.

@tony-co
Copy link
ContributorAuthor

@lyrixx Concerning points 1 and 2, I could rephrase and tell the user to check his web server documentation (Apache/Nginx).
Then point 3, I don't know. It could lead to bad practices but you made some good points.

@weaverryan
Copy link
Member

Yea, I think we should rephrase to tell the user to check their web server - like you mentioned@tony-co.

About point 3, is it true (or not true) that using the same user for many things means that if one thing were compromised (e.g. your web server, or some security hole in your web app itself that allows people to access files or run a command) that things are worse because the attacker can access more parts of your system? Or is this not really a big concern? For me, that's the part (if it makes sense) that I wanted to warn people about. But@lyrixx you're saying that you do this on purpose, and I'll admit that your setup does indeed sound very simple - I like that :).

So, do we or don't we recommend using the same user in production? Or do we need to involve others that know more? I know that I don't know :).

Thanks!

@xabbuh
Copy link
Member

I don't agree with@lyrixx. I don't want the webserver user to be able to write anywhere than in some dedicated directories (like cache, log, etc.). I don't want my webserver for example to be able to delete my entire application or to add new files to the web directory which would then be served by it.

@lyrixx
Copy link
Member

I think we could omit everything about production. It's simpler, and error-proof ;)

@xabbuh Deleting .php file is useless for an attacker. Accessing your databases and other credentials is really more important. Give me an access to your server withwww-data and you will see ;)

@xabbuh
Copy link
Member

@lyrixx Depends on what he wants to achieve. Nonetheless, is he not only able to delete files but also can create new files if he got write permissions. Of course, that's no the only thing you have to take care of.

configuration file ``httpd.conf`` and updating the User and Group values
from ``www-data`` to your CLI user. Obviously, this is only recommended in
development environment as you do not want to give Apache full control over
your whole production system.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I agree with@lyrixx that we should just avoid talking about production - so remove the last sentence. We already start with "In development environments", so I think we're good :).

@tony-co
Copy link
ContributorAuthor

ping@weaverryan

@weaverryan
Copy link
Member

Thanks for the fast update! I've patched this into the 2.3 branch. Cheers andt thanks everyone!

weaverryan added a commit that referenced this pull requestMar 19, 2014
This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes#3563).Discussion----------Add another tip to setup permissions| Q             | A| ------------- | ---| Doc fix?      | no| New docs?     | yes| Applies to    | all| Fixed tickets | n/aThis is a quick tip on the installation guide to use the same user for CLI and HTTP.Commits-------0d5bcd7 Rephrase625369a Updated tip with latest commentsb955d99 Update installation.rst1aaa291 Add another tip to setup permissions in dev environnement.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@tony-co@weaverryan@lyrixx@xabbuh@cordoval

[8]ページ先頭

©2009-2025 Movatter.jp