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

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

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.


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.

| improve this answer | |

/usr/share is, as the quoted passage says, "used by web applications packaged in Debian."

If you install, say, Wordpress from an apt repository, it will be installed into /usr/share.

If that's still not plain English enough, we'll need more detail about what part of it you're understanding and what part of it you're not.

| improve this answer | |
  • I do not understand whether I need to grant permissions for this folder if I am rolling out my own project. The only thing I have installed from apt (related to this project) is the mongo database. – Salvador Dali Sep 10 '14 at 6:46

Additional information to the answer of davidgo:

You might want to grant access only from your local server, so configure it like the following:

<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from ::1/128
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.