PHP can't read file with read permissions
<p>I have a file with these permissions (0644)</p>

<pre><code>-rw-r--r-- 1 root root
</code></pre>

<p>So from my understanding this file should be readable by anyone.</p>

<p>Now I have this code:</p>

<pre><code>file_get_contents('/path/to/file');
</code></pre>

<p>And it is giving me this</p>

<blockquote>
  <p>Warning: file_get_contents(...): failed to open stream: Permission denied in ...</p>
</blockquote>

<p>What am I missing?</p>

<p>I'm running it from a web server under <code>www-data</code>.</p>