Ubuntu 9.10 Apache permissions

I recently installed Ubuntu 9.10 (was on 9.04 before). I’m running a local development environment with Eclipse where my workspace is located at /home/jeremy/workspace. I installed the LAMP server using tasksel. I created a new virtual host pointing at a subdirectory in my workspace:

/home/jeremy/workspace/mysite.com/httpdocs

See below for the relevant part of my virtual host file which I started by copying the default host file. I’ve tried everything I can think of but no matter what I just get a 403 Forbidden error with this in my Apache log:

[client 127.0.0.1] (13)Permission
denied: access to / denied

I set the group of the /home/jeremy/workspace/mysite.com directory and everything below to www-data. I also added my user (jeremy) to that group. I first tried chmod’ing that directory to 755. Didn’t work. Then I went extreme and did 777 and that still didn’t work! Has anybody got any ideas what is going on here? Is this a known issue for Apache on Ubuntu 9.10? I have made the appropriate entry in my hosts file so I know for sure that I’m accessing this locally.

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName mysite.com   

    DocumentRoot /home/jeremy/workspace/mysite.com/httpdocs

    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>


    <Directory "/home/jeremy/workspace/mysite.com/httpdocs/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

Answer

Check the permissions on every directory from /home/jeremy on up, one of them may not be allowing www-data access. I know on the 9.10 install I just did, home directories are created 700 by default, which would certainly restrict this.

Attribution
Source : Link , Question Author : Jeremy Hicks , Answer Author : Graeme

Leave a Comment