# Fuse FS/libewf and Apache permissions



## Tomse (May 6, 2014)

FreeBSD devserver.local 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 17 01:46:25 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386

I've run into a permissions problem using FUSE.

The goal is to fuse mount a drive to be seen from www/apache22 as a regular Apache directory listing (options +indexes).

So taking from the default setting of /usr/local/etc/apache22/httpd.conf with an extra setting

```
<directory /usr/local/www/apache22/data/mounted>
options +indexes
order allow,deny
allow from all
</directory>
```

After creating /usr/local/www/apache22/data/mounted/disk1 directory, and starting apache of course, disk1 is viewable in a directory listing from the browser.
All is good, `mount` a UFS or `mount_ntfs` disk to this directory is no problem, still the directory and now the disk contents are showing.

Trying to do the same using devel/libewf, but mounting a L01 file 
`ewfmount -X allow_other -f files /path/to/disk.l01 /usr/local/www/apache22/data/mounted/disk1`
(-X passes the parameter to the subsystem)
disk1 is now gone from the directory listing in the browser.

Accessing http://localhost/mounted returns the Apache error

```
[Mon May 05 15:42:42 2014][error] [client 127.0.0.1] (22)Invalid argument: access to /mounted/disk1/index.php failed (filesystem path '/usr/local/www/apache22/data/mounted/disk1/index.php')
```
(Okay, I have PHP5 installed too, and set index.php up as directory index.)

Using the shell I can enter the mounted directory as a non-privileged user (otherwise not possible if omitting the -X allow_other parameter for `ewfmount`).

Some hints I've seen when searching this problem is /etc/fuse.conf user_allow_other and adding the user to the fuse group.
None of this seems to apply to FreeBSD.

I'm almost sure it's not a problem of devel/libewf but a permission problem that I can't seem to find.

I had a communication with the author of devel/libewf  he thinks it might be a permission issue as well.


----------

