Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 am very new to Linux, and I just installed Ubuntu. It really is exciting and I already installed my own apache and mysql. The server is running.

I have my website's files under /var/www but some files are excluded from user access. In my windows environment I put them under C:/Special and I wish to know where I should put them under Ubuntu.

share|improve this question
Do you have any particular reason for wanting them outside of /var/www as opposed to, for example, giving yourself or others access to modify files in /var/www? – thomasrutter May 16 '12 at 8:20
Some of the files are scripts that should be run under the system exclusively, and not by users. Its a security measure – Ted May 16 '12 at 8:31

You can put them in your home folder (i.e. /home/user/www) and change the Directory and DocumentRoot directive in your Apache config. If you do it this way only the user 'user' will be able to see the files but of course you still need the user 'root' to run the apache daemon not 'user'.

share|improve this answer

You should simple make a directory under /var/www which is not accessible for other users

chmod o-rwx /var/www/special

for full security you should also mark the files inside this directory with the same permissions.

share|improve this answer

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.