title: Why my php-script executed when file permissions only read and write?
body: <p>My name lebnik, and information about me:</p>
  
  <pre><code># id lebnik
  uid=1000(lebnik) gid=1000(lebnik) groups=1000(lebnik),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev)
  </code></pre>
  
  <p>My web-server Apache run php-scripts from user www-data, check this:</p>
  
  <pre><code>root@debian /etc/apache2 # grep -R "APACHE_RUN_USER=" .
  ./envvars:export APACHE_RUN_USER=www-data
  </code></pre>
  
  <p>Information about user www-data:</p>
  
  <pre><code># id www-data
  uid=33(www-data) gid=33(www-data) groups=33(www-data)
  </code></pre>
  
  <p>I create php-script file.php: </p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  error_reporting(E_ALL);
  ini_set('display_errors',1);
  
  echo 'script executed';
  ?&gt;
  </code></pre>
  
  <p>Next, I check permissions my file.php</p>
  
  <pre><code># ls -la
  total 16
  drwxrwxrwx 1 www-data www-data 4096 Oct 18 00:49 .
  drwxrwxr-x 1 www-data www-data 4096 Oct 18 00:36 ..
  -rw-rw-r-- 1 www-data www-data  225 Oct 18 00:46 file.php
  </code></pre>
  
  <p>I try call my script with Apache: curl <a href="http://starsite.l/file.php" rel="nofollow">http://starsite.l/file.php</a> and see:</p>
  
  <pre><code>script executed
  </code></pre>
  
  <p>Why my php-script executed when file permissions only read and write?</p>