Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm recently moving from windows to linux, so I've setup my machine to dual boot Windows7 and Ubuntu 10.04. I was able to successfully setup Apache on the Ubuntu partition, but I need to move the DocumentRoot since my websites are on a TrueCrypt partition that is in another hard drive so I can have them accessible in both OS. I followed some guides on how to change the path for the DocumentRoot so I end up modifiying the default file at /etc/apache2/sites-available

DocumentRoot /media/truecrypt1/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /media/truecrypt1/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

Those are the lines that I've changed, but now when I go to localhost I always get the Forbidden You don't have permission to access / on this server. Apache/2.2.14 (Ubuntu) Server at localhost Port 80

share|improve this question
add comment

1 Answer

Probably the permissions on /media/truecrypt/www are not set to where the user/group Apache runs as (likely www-data:www-data) can get to them. Use chown to set at least the group to www-data on /media/truecrypt/www recursively, and make sure it's chmod 750, or 770 if you have cgi or other scripts that need write access to that directory.

Don't use chmod 755 or 775 (and definitely NOT 777) on /media/truecrypt/www because you likely don't want processes other than Apache as www-data:www-data accessing your Truecrypted files

share|improve this answer
    
Thanks for the response, I did sudo chown -R www-data:www-data /media/truecrypt1/www/ && chmod -R 755 /media/truecrypt1/www/ and then sudo /usr/sbin/apache2 restart but still getting the forbidden error –  Alan C Nov 1 '10 at 19:04
    
Perhaps then there's a permission issue with the /media/truecrypt1 directory itself, when you made the mount point before you mounted the truecrypt partition. –  ultrasawblade Nov 1 '10 at 20:11
    
So, should I ask in the TruCrypt forums or something like that? Or how can I see if it is a permission issue with the directory? –  Alan C Nov 1 '10 at 23:37
add comment

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.