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 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥15 python爬取bilibili校园招聘网站
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件
  • ¥15 不同系统编译兼容问题
  • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?