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: [http://www.diigo.com/item/image/80d3/d3ha]

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


<VirtualHost *:80>
    ServerAdmin emailxxx@gmail.com

    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?

  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 (https://forums.virtualbox.org/viewtopic.php?f=3&t=15868).
  3. Same thing with '/'; only root and vboxsf can read it.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.