Issue
currently I am trying to set up a virtual machine for development for a client. Three SVN repositories with PHP code have to be combined in one folder (I know it's ugly, but that's how they roll). I Googled a little and found mhddfs. So I checked out the three repositories in a folder called branches
:
branches/branch1
branches/branch2
branches/branch3
I mounted the three branches with mhddfs
at /mnt/dev
. At the filesystem level, everything works as expected, so ls
correctly displays the contents of all three folders (they are disjoint). However, trying to fire up the document root with Apache results in a 403 Forbidden error. I tried other locations than /mnt/dev
as well, leading to no difference.
[Mon Feb 06 17:44:41 2012] [error] [client 192.168.56.1]
(13)Permission denied: access to / denied
When I do not mount the three folders but just put an index.php
file into /mnt/dev
, everything works as expected. Am I missing something?
Thanks for your help in advance.
EDIT: Some more data on the problem: When I create two directories, that are world-accessible ...
root@devbox:/tmp > ls -lha
drwxrwxrwt 6 root root 4,0K 6. Feb 20:11 .
drwxr-xr-x 21 root root 4,0K 6. Feb 10:07 ..
drwxrwxrwx 2 www-data vboxsf 4,0K 6. Feb 20:11 test1 # includes index.htm
drwxrwxrwx 2 www-data vboxsf 4,0K 6. Feb 20:13 test2 # includes index2.htm
... and mount them via mhddfs ...
mhddfs /tmp/test1,/tmp/test2 /mnt/dev
mhddfs: directory '/tmp/test1' added to list
mhddfs: directory '/tmp/test2' added to list
mhddfs: mount to: /mnt/dev
mhddfs: move size limit 4294967296 bytes
... ls
behaves correctly ...
root@devbox:/tmp > ls -lh /mnt/dev/
insgesamt 8,0K
-rwxrwxrwx 1 www-data vboxsf 12 6. Feb 20:11 index2.htm
-rwxrwxrwx 1 www-data vboxsf 11 6. Feb 20:11 index.htm
... while Apache (user: www-data
, group: vboxsf
) doesn't and terminates with the 403 error stated above. However, if I unmount the folders and just put an index.htm
in /mnt/dev
, everything works as expected as Apache can read the file.
Any ideas?
All the best, Martin
Solution
I encountered the same problem on Linux.
Following the steps below, I was able to solve it.
[STEPS]
- Enable 'user_allow_other' in /etc/fuse.conf
- Use mhddfs with '-o allow_other' option
ex. mhddfs -o allow_other /dir1,/dir2 /path/to/mount
Answered By - Kaz