title: fileperms(): stat failed, but the file exists
body: <p>I'm using the <a href="http://openvpn-web-gui.sourceforge.net/" rel="nofollow">OpenVPN Web GUI</a> and I'm having some problems because the program doesn't see one of the necessary files. The <code>ls -l</code> for the file is as follows:</p>
  
  <pre><code>-rw-r--r-- 1 root www 4153 Dec 20 10:12 /etc/openvpn/inn.crt
  </code></pre>
  
  <p>But when I run the program, it claims that the file doesn't exist. I tried this <code>sprintf('%d', fileperms($sLongFileName));</code>, which raises the "can't stat" warning. <code>file_exists()</code> also returns false. There exists another file that's visible to PHP:</p>
  
  <pre><code>-rw-r--r-- 1 root www 581 Dec 21 12:52 /etc/openvpn/crl.pem
  </code></pre>
  
  <p>What's the cause of this?</p>
  
  <p>EDIT: I had the program do this for both files:</p>
  
  <pre><code>file_put_contents("_dumpfile", "\n&lt;&lt;".$sLongFileName."&gt;&gt;\n", FILE_APPEND);
  </code></pre>
  
  <p>And the result is this:</p>
  
  <pre><code>&gt;&gt;/etc/openvpn/inn.crt
  
  &lt;&lt;/etc/openvpn/crl.pem&gt;&gt;
  </code></pre>
  
  <p>Is there some problem with the file path?</p>