Grant access to /usr/share in apache2.conf

apache-2.4

I have noticed that I have the following lines in apache2.conf (on ubuntu 14.04):

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

And the reason for this is written as:

not allow access to the root filesystem outside of /usr/share and /var/www.
The former is used by web applications packaged in Debian,
the latter may be used for local directories served by the web server.

But this tells me absolutely nothing. Can someone explain in a plain English why do I need to grant access to this folder.

Best Answer

if you are not using web applications which are packaged with your OS (or you install to that location) you can safely ignore it.

Examples of stuff which might be there though would include common PHP libraries (like ADODB etc), frameworks like Zend, programs like Cacti, Nagios, Cups etc may all be there.

There is, of-course, no harm in commenting this code out if you don't think your application uses it, and add it back if you get errors in your log of the nature that it can't read files there.

Related Topic