Yet another (13)Permission denied error on Apache2 server

Posted by lollercoaster on Server Fault See other posts from Server Fault or by lollercoaster
Published on 2011-04-18T08:12:59Z Indexed on 2013/10/30 3:58 UTC
Read the original article Hit count: 693

I just can't figure it out. I'm running apache2 on a Ubuntu 10.04 i386 server. Whenever I visit my server (has an IP address, and is connected to internet with static IP xxx.xxx.xxx.xxx) so that's not the problem) in browser, mysub.domain.edu (renamed here), I get the following:

Forbidden
You don't have permission to access /index.html on this server

The apache2 error log confirms this:

[Mon Apr 18 02:38:20 2011] [error] [client zzz.zzz.zzz.zzz] (13)Permission denied: access to / denied

I'll try to provide all necessary information below:

1) Contents of /etc/apache2/httpd.conf

DirectoryIndex index.html index.php

2) Contents of /etc/apache2/sites-available/default

<VirtualHost *:80>
ServerAdmin [email protected]

DocumentRoot /home/myusername/htdocs
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
<Directory "/home/myusername/htdocs/">
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
order allow,deny
allow from all
DirectoryIndex index.html index.php
Satisfy any
</Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>
ServerName mysub.domain.edu

</VirtualHost>

3) Contents of /etc/apache2/sites-enabled/000-default

<VirtualHost *:80>
ServerAdmin [email protected]

DocumentRoot /home/myusername/htdocs
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
<Directory "/home/myusername/htdocs/">
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
order allow,deny
allow from all
DirectoryIndex index.html index.php
Satisfy any
</Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all 
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>
ServerName mysub.domain.edu

</VirtualHost> 

4) Result of ls -l (when I'm using sudo -i to be root):

root@myserver:/home/myusername# ls -l
total 4
drwxr-xr-x 2 www-data root 4096 2011-04-18 03:04 htdocs

5) ps auxwww | grep -i apache

root@myserver:/home# ps auxwww | grep -i apache
root     15121  0.0  0.4   5408  2544 ?        Ss   16:55   0:00 /usr/sbin/apache2 -k start
www-data 15122  0.0  0.3   5180  1760 ?        S    16:55   0:00 /usr/sbin/apache2 -k start
www-data 15123  0.0  0.5 227020  2788 ?        Sl   16:55   0:00 /usr/sbin/apache2 -k start
www-data 15124  0.0  0.5 227020  2864 ?        Sl   16:55   0:00 /usr/sbin/apache2 -k start
root     29133  0.0  0.1   3320   680 pts/0    R+   16:58   0:00 grep --color=auto -i apache

6) ls -al /home/myusername/htdocs/

root@myserver:/# ls -al /home/myusername/htdocs/
total 20
drwxr-xr-x 2 www-data   root       4096 2011-04-18 03:04 .
drw-r--r-- 4 myusername myusername 4096 2011-04-18 02:13 ..
-rw-r--r-- 1 root       root         69 2011-04-18 02:14 index.html

I'm not currently using any .htaccess files in my web root (htdocs) folder in my user folder.

I don't know what is wrong, I've been trying to fix his for over 12 hours and I've gotten nowhere. If you have any suggestions, I'm all ears...

© Server Fault or respective owner

Related posts about virtualhost

Related posts about ubuntu-10.04