2

Seems like something which should be easy to find but Googling brings up lots of unrelated tasks.

I have a deploy scipt which runs under the user "deploy" but my web server runs as "nginx" I want the web server to be able to write to the deployed files.

Ive added nginx to the deploy user group and I believe I can write files with deploy user with the ownership "nginx:deploy" easily now but by default it creates files as "deploy:deploy" obviously which nginx won't write too.

Is there anyway to change the user so that by default creates files as "nginx:deploy" to solve this problem?

4

1 回答 1

0

install命令具有控制它创建的文件的所有者和组的选项。但一般来说,只能root以不同的用户身份创建文件。也许您可以配置sudoers为让用户以用户身份deploy运行所需的命令。sudonginx

于 2014-02-15T21:13:02.450 回答