Permissions for reading pdf files
<p>I am working with the TCPDF library. I have two machines, one with Debian Testing, and the other is an Ubuntu 15.10. I developed a class for generating pdf reports, but I have a problem, when I tested it in the Debian host, everything works perfect:</p>

<p>1- I created a folder named: "pdf" in <code>/var/www</code>
2- Then I did: <code>sudo chown -R www-data:user /var/www/pdf</code>
3- Generate the pdf file and I obtain:</p>

<pre><code>-rw-r--r--  1 www-data www-data 76113 ene 18 09:53 out.pdf
</code></pre>

<p>4- The folder has:</p>

<pre><code>drwxr-xr-x 2 www-data user    4096 ene 18 09:53 pdf
</code></pre>

<p>I used:</p>

<pre><code>const base_path = '/var/www';
$pdf-&gt;Output(self::base_path . '/pdf/out.pdf', 'F');
</code></pre>

<p>Showing it inside an iFrame:</p>

<pre><code>&lt;iframe width="100%" height="500" frameborder="0" allowfullscreen="true" src="/var/www/pdf/out.pdf" name="iFrameName" id="iframeID"&gt;&lt;/iframe&gt;
</code></pre>

<p>I copied the entire project to the Ubuntu host, but showing the pdf file inside the browser I get this error:</p>

<pre><code>Forbidden
You don't have permission to access /var/www/pdf/out.pdf on this server.
</code></pre>

<p>Altought I have the following file settings:</p>

<pre><code>-rw-r--r--  1 www-data www-data 76113 ene 18 12:06 out.pdf
</code></pre>

<p>And the folder has:</p>

<pre><code>drwxrwxr-x 2 www-data ubuntu-user    4096 ene 18 09:53 pdf
</code></pre>

<p>I suspect the error is inside an apache setting I'm missing on Ubuntu.</p>