duanbing2963 2011-11-24 21:58
浏览 53
已采纳

Web服务器上的文件夹权限

I have Jenkins set up doing tests and other nice stuff for a college PHP project. What I would like to do is telling Jenkins (through a deploy job) to copy the source code folder to a Web folder I have running with nginx and php-fpm.

I’m really, really new to much of this technical knowledge, for instance, so I’m still trying to figure out how to set all this up. I have nginx and php-fpm running as http user/group configuration.

I’ve been reading about PHP-FPM pools, but I’m still curious as to how to set up the whole process.

Where do I set folder permissions for that Web folder so that I don’t have to use sudo or root everywhere? How do I reference it in nginx without user:group problems? Same as PHP? Can Jenkins simply run a cp source/folder webserver/project by adding it to the http group, or in fact, without using sudo at all? Yes, I know, a lot of questions, and a lot of doubts about permissions/security.

Thanks in advance!

PD: This is on a RackSpace Cloud Server running ArchLinux, nginx 1.0.10, PHP-FPM 5.3.8 and Jenkins 1.439.

  • 写回答

2条回答 默认 最新

  • dpntq48842 2011-11-25 06:19
    关注

    Assuming jenkins is run as a user different from http, the easiest way to achieve this would be to add that user to http group and ensure that the relevant webserver folder has write permission for http group. (drwxrwxr-x or similar).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?