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

Update nginx-boot.sh to change root to nginx user #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MarkErik
Copy link

@MarkErik MarkErik commented Jul 4, 2020

Run the nginx process, and file ownership as nginx rather than root.

Run the nginx process, and file ownership as nginx rather than root.
@MarkErik
Copy link
Author

MarkErik commented Jul 4, 2020

From what I understand, if possible it is best to run as few things as possible with the root user.

However, from what I read, nginx gets started by root, and then spawns a second process that has less privileges - and so this PR may be a moot point. But it seems like it can't hurt to have nginx running from the start as the nginx user.

*Original
PID USER TIME COMMAND
1 root 0:00 nginx: master process nginx -c /etc/nginx/mushed.conf
11 root 0:00 nginx: worker process
12 root 0:00 bash
18 root 0:00 ps

*Proposed change
1 root 0:00 nginx: master process nginx -c /etc/nginx/mushed.conf
11 nginx 0:00 nginx: worker process
12 root 0:00 bash
18 root 0:00 ps

@MarkErik
Copy link
Author

MarkErik commented May 7, 2022

@cusspvz I was wondering if you'd be willing to accept this PR into the project. I've been using it for a while and it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant