English 中文(简体)
what user I should run my nginx or php-fpm processes
原标题:

Ok. Im little bit confused about those permissions in linux so please people help me out. The trouble is that I dont want to run server as root, so I created another user with sudo privileges so he runs the nginx and php-fpm servers (example "sudo_user"). But the trouble is for example I have "some_user" and he has a directory of his web-site "some_user/www.some_user.com" with all the configuration files, including database passwords and so on. I set ownership of all files to some_user:some_user (user:group) and changed permissions to all files 751 (u=rwx,g=rx,o=x so other accounts cant just go in this dir and read every config file) and set to public files permission 755. But my php-fpm runs with "sudo_user" with a group "sudo_user" he don t have a permission to write or read config files in "some_user" directory. What strategy should I take?

最佳回答

Its probably better to create an nginx user and nginx group, and have nginx/php run under that user. Then you can add the user nginx to your some_user/sudo_user s groups with your 751 permissions and you should be set.

问题回答

暂无回答




相关问题
Not authorized to write to this feed

I am calling service.insert(new URL(getContentFeedUrl()), newAttachment); for Google sites file upload using MediaStreamSource in servlet and get following exception com.google.gdata.util....

php javascript permissions problem

Kind of a weird problem... not something ive ever run into before. So, i am using CKeditor, and am creating the upload and browse functions for users to upload and use images in the rich text editor. ...

Limiting Access by Permission

thanks for viewing this. I have a db that has users, roles & user_roles. What I am trying to achieve is a login that will select users who have Admin or Associate permissions. The login then uses ...

SQL Agent not kicking off an SSIS package

I have a server that has a SQL Agent job setup to run a two part datawarehouse build and Analysis Services cube build. The job ran successfully until there was a problem with Management Studio and ....

SharePoint : web service permission error

I have a sharepoint site, and I am calling a standard sharepoint web service. I create the web service request like this : wsDws.Url = this.SiteAddress + @"/_vti_bin/Dws.asmx"; When I use ...

热门标签