Add nginx to user and group

Hi !

I know it’s a common problem but I can’t find a complete answer, I, for now, just have pieces of it.

While trying to setup a Nginx server I bumped into a known issue for beginners which is user permission & groups. My Nginx server need to read my files in /srv/http/project but I don’t want to do a “chmod 777” as I learned it is a security issue (any user can access) even if I used it during school :S.

I can see the http user, which I used in the past for Apache server, and the http group but not the nginx user.

How can I link the nginx app to a user to http group then ?

I am missing something… If you can help me ! Thank you !

You should find the answers you’re looking for here:

1 Like

By default nginx runs the process that reads and serves the website as the http user. There is no nginx user in Arch and Manjaro, it is the normal http user.


add your self to the http group

sudo gpasswd -a $USER http

logout and login then

sudo chmod ug+rw /srv/http -R

Thank you so much guys !! :ok_hand: