Skip to content

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

Open
MarkErik wants to merge 1 commit into
cusspvz:masterfrom
MarkErik:non-root
Open

Update nginx-boot.sh to change root to nginx user#8
MarkErik wants to merge 1 commit into
cusspvz:masterfrom
MarkErik:non-root

Conversation

@MarkErik

@MarkErik MarkErik commented Jul 4, 2020

Copy link
Copy Markdown

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

MarkErik commented Jul 4, 2020

Copy link
Copy Markdown
Author

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

MarkErik commented May 7, 2022

Copy link
Copy Markdown
Author

@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