LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   User permissions for nginx (https://www.linuxquestions.org/questions/linux-newbie-8/user-permissions-for-nginx-4175524983/)

Fcukinyahoo 11-10-2014 12:00 PM

User permissions for nginx
 
Good Day,

There is a linux user and group called "developers" (has no sudo access) with home folder in "/home/developers".

There is nginx running on the same server, there is a web folder for a site called "mysite.com". that web folder is in "/usr/local/nginx/html/mysite.com/" Folder site rights are "nginx:developers" and chmod permissions are 770. Now here comes the problem.

Users "scp" their files into the server using "developers" user. Files get stored in "/home/developers" folder WITH "developers" owner (obviously). Users have to copy those files into "/usr/local/nginx/html/mysite.com/" folder. After "developers" user copies files lets say "testfile.py" into "/usr/local/nginx/html/mysite.com/" owner of the file stays as "developers:developers". Therefore, nginx can not read the file.

How can I make that work? How can I allow user "developers" to transfer files into "/usr/local/nginx/html/mysite.com/" with nginx:nginx permissions? (without giving sudo access). Or what can I do on group level to make sure nginx will read those files?

Edit: nginx and php-fpm running as "nginx"

Thanks in advance.

Fcukinyahoo 11-11-2014 09:28 AM

never mind found the problem. My solution for permissions with group didn't work because i didn't know i had to restart nginx after changing permissions. Microsoft moment for a second...


All times are GMT -5. The time now is 06:36 AM.