Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently set up a PPA on Launchpad for distributing my web application. Since it's a server-app, I need to put my data into /var/www/html which apparently is not wanted by Lintian ("dir-or-file-in-var-www").

So far, I accomplish the task via a postinst script, which copies the files after installation, but there has to be a more elegant way, isn't there?

share|improve this question
up vote 2 down vote accepted

There is not a more elegant solution. A postinstall-script is allowed under certain conditions, and your package seems to satisfy these conditions. From https://lintian.debian.org/tags/dir-or-file-in-var-www.html:

As an exception, packages are permitted to create the /var/www directory due to its past history as the default document root, but should at most copy over a default file in postinst for a new install. In this case, please add a Lintian override.

Please consult the rest of https://lintian.debian.org/tags/dir-or-file-in-var-www.html as well.

share|improve this answer
Thank you. For anyone else wondering: In my .install-file I move the data to /usr/share, with the postinst-script I determine the DocumentRoot via "docRoot=$(grep -i 'DocumentRoot' /etc/apache2/sites-available/000-default.conf)" and then I move the data from /usr/share to docRoot – paranerd Jul 24 '14 at 15:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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