Map /home/userdir into apache-jail

Hello,

Is there a way to mount/map the user data into an (ezjail) so that apache (php) can have access to the files? How do I do this secure (ZFS writeable snapshot?)? How do I handle the permissions (home files must be writeable for apache)?

Regards
 
Use nullfs(5) and mount it read-only.

For example:
# mount -t nullfs -o ro /home/myhomedir /jails/web/storage/

Then configure Apache to show the /storage/ directory.
 
I am failing with configuring Apache:

httpd.conf:
Code:
<Directory "/usr/local/www/apache22/data/owncloud/data/bodo/files" />
    AllowOverride None
    Order allow,deny 
</Directory>
Code:
# /usr/local/etc/rc.d/apache22 restart
Performing sanity check on apache22 configuration:
Syntax error on line 172 of /usr/local/etc/apache22/httpd.conf:
Multiple <Directory> arguments not (yet) supported.
 
bsus said:
Code:
<Directory "/usr/local/www/apache22/data/owncloud/data/bodo/files" />
Remove that last slash.

Code:
<Directory "/usr/local/www/apache22/data/owncloud/data/bodo/files">
 
Thank you this was it :)

I now decided to mount -t nullfs a cloned zfs snapshot because I need write access. Unfortunatly (I am using some WebDAV) I can access my data over the url without authentication but there should only be access through the application. Is there a quick fix or do I have to play around with the apache authentication modules?
 
Hi,

Had to change "AllowOverride All" so that the .htaccess gets used.

Thank you for the support :)
 
Back
Top