[gollem] directory up from home

eculp at encontacto.net eculp at encontacto.net
Sat Dec 7 14:46:38 2002


Quoting Gaudenz Steinlin <gaudenz@soziologie.ch>:

 | hi
 | 
 | As it seems, with a ftp backend gollem handles all paths relative to the
 | home directory of the user. So you can only change to e.g. /var/www by
 | entering the get parameter dir=/var/www directly.
 | Was this made intentionally like that or is this a bug? Do you know how
 | to change that?
 | If it's a bug, I could dig further and try to fix it. From a quick dig
 | into the sources, I suspect a solution would have to add something like
 | a realpath($dir) function to VFS. Is this the right way to do it?
 
If I'm understanding you correctly, the file backend gives you something
like that.  On one machine I use the following that is easily to modify:

$vdomain = strtolower(preg_replace('/^mail\.|^www\./i', '', \
$_SERVER['HTTP_HOST']));

$backends['file'] = array(
    'name' => 'Virtual Web Directories',
    'driver' => 'file',
    'preferred' => '',
    'hordeauth' => 'full',
    'params' => array('vfsroot' => ( $vdomain == "personaldomain.com" \
     ? '/usr/local/www/data' : '/usr/local/www/data/' . $vdomain )));


Hope this is what you are looking for,

ed


-- 


-------------------------------------------------



More information about the gollem mailing list