title: Apache 2.4 with FastCGI php5-fpm on ubuntu 14.04
body: <p>I am trying to replace SuPHP with FastCGI.
  Earlier, I had folders with different owners and groups. Each group had www-data as a member as well.
  When any php file was run using the browser, it was run as the owner of the file.
  So if a file was owned by user A (Group A - www-data and A as members), it was executed as user A</p>
  
  <pre><code>shell_exec('whoami') =&gt; return A
  </code></pre>
  
  <p>Now, I installed fastcgi and have configured it to run PHP files.</p>
  
  <p>Here is my php5-fpm.conf file</p>
  
  <pre><code>&lt;IfModule mod_fastcgi.c&gt;
                  AddHandler php5-fcgi .php
                  Action php5-fcgi /php5-fcgi
                  Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
                  FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
          &lt;/IfModule&gt;
  </code></pre>
  
  <p>My issue is, now when I run the same file which is owned by A, </p>
  
  <pre><code>shell_exec('whoami') =&gt; return www-data
  </code></pre>
  
  <p>What am I doing wrong?</p>