Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed ubuntu server 12.04 and used windows 7 folder as shared folder using guestadditions. I can see the folder as sf__projects, so i symlinked it to var/www/_projects

But the issue is all folders have user root assigned to them. I tried so many options from different blogs but nothing works.

This is what I am getting on apache error log:

[Tue Jul 17 17:43:27 2012] [crit] [client] (13)Permission denied: /var/www/_projects/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

screenshot of folders: []

/etc/hosts:       bab.local   www.bab.local


<VirtualHost *:80>

    DocumentRoot "/var/www/_projects/bab/master"

    ServerName bab.local
    ServerAlias www.bab.local

    ErrorLog /var/www/_projects/bab/master/var/logs/apache_error.log
    CustomLog /var/www/_projects/bab/master/var/logs/access.log combined

    <Directory /var/www/_projects/bab/master/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride all
            Order allow,deny
            Allow from all

my windows host file:    bab.local   www.bab.local

when i try to access site through browser, i get:

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

I am exactly not sure why it's trying to access: var/www/_projects/.htaccess

NOTE: is ubuntu's ip windows ip

Has anyone experienced this and fixed it?

share|improve this question
up vote 3 down vote accepted
  1. It's trying to read the .htaccess file because it's there. Your httpd (apache) is set to read the filename set in the AccessFileName directive and you have AllowOverride All. If you don't need the settings in the .htaccess file then you can just delete that file.
  2. It can't read the .htaccess file because only root and vboxsf can read/write from/to it. Your httpd is probably running as www-data since you're on Ubuntu 12.04. Check your httpd configuration which User it is running as. You can add an entry in your /etc/fstab for your VirtualBox shared folder to set the uid (and gid) when mounting it. Looks like you can't rely on fstab to successfully mount the volume on boot because, apparently, fstab gets read before the sf (sharedfolder) module gets loaded so you should use the mount command in /etc/rc.local if you want it to mount automatically (
  3. Same thing with '/'; only root and vboxsf can read it.
share|improve this answer

Your Answer


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.