Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The files in the folder "/usr/share/nginx/html" belongs to the user "nginx" (or root ?), the primary user "2x2p1p" can't modify these files, then the best thing to do is:

1 - Change the user and the group of the folder "/usr/share/nginx/html" (chown -R 2x2p1p:2x2p1p /usr/share/nginx/html)

2 - Add the user "2x2p1p" to the group "nginx" (usermod -a -G nginx 2x2p1p; chmod -R 664 /usr/share/nginx/html)

So, what shall I do ?

Thanks

share|improve this question

1 Answer 1

Of these two options, the first is preferable. By adding your user to the nginx group you may inadvertently give them access to other files critical to the proper running of nginx. If you simply modify the permissions on /usr/share/nginx/html, you know exactly what you're exposing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.