Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
1  
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? –  neon_overload 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

2 Answers 2

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

 
discard

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.