title: Folder permissions on Web server
body: <p>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.</p>
  
  <p>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 <strong>http</strong> user/group configuration.</p>
  
  <p>I’ve been reading about PHP-FPM pools, but I’m still curious as to how to set up the whole process.</p>
  
  <p>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 <code>cp source/folder webserver/project</code> 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.</p>
  
  <p>Thanks in advance!</p>
  
  <p>PD: This is on a RackSpace Cloud Server running ArchLinux, nginx 1.0.10, PHP-FPM 5.3.8 and Jenkins 1.439.</p>