I can view all files in the root directory (/var/www) but as soon as i enter a sub directory (eg /var/www/test) i get a 403 Forbidden error. I'm running Ubuntu 12.04.01.
Have tried searching for similar problems but found no solution.
Update: Checked error log in /var/log/apache2/error.log and it contains:
client denied by server configuration: /var/www/test/
Update: If i su into www-data and try to cd into any of the sub-directories it gives me the error:
cd test sh: 4: cd: can't cd to test
Update: By doing ls -l in /var/www i get:
drwx------ 3 nicklas nicklas 4096 Sep 13 18:35 test
Could that be the issue?
Update: I fixed it! I ran the following command, and it seems to be working fine now.
cd /var/www chown -R www-data:www-data *