<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="http://bugs.horde.org/themes/feed-rss.xsl" type="text/xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <title>jail for multiple homes</title>
  <pubDate>Sun, 07 Sep 2008 04:41:22 -0400</pubDate>
  <link>http://bugs.horde.org/ticket/6435</link>
  <atom:link rel="self" type="application/rss+xml" title="jail for multiple homes" href="http://bugs.horde.org/ticket/6435/rss" />
  <description>jail for multiple homes</description>

  
  
  <item>
   <title>Hi,

If you have multiple home directories on the ftp serv</title>
   <description>Hi,

If you have multiple home directories on the ftp server like;

/home_1/user_a
/home_2/user_b

you cannot define a static 'root' =&gt; '/home' and a 'home' =&gt; Auth::getAuth() line to jail a user to the home (in conf/backends.php).

The only choice left (that I could figure out :) is to use something like 'root' =&gt; '~' and 'home' =&gt; './' which seems to be working until you try to &quot;cd&quot; to a sub-directory (error: ~/~/sub-directory not found).

This did the trick for me;

Added the lines below to horde/gollem/lib/Sessions.php just above the comment:
&quot;Make sure the home parameter lives under root ....&quot; on line 127;
 
if (!empty($ptr['multihomejail'])) {
     if ($ptr['multihomejail'] == true) {
         $ptr['home'] =  $GLOBALS['gollem_vfs']-&gt;getCurrentDirectory();
         $ptr['root'] =  $ptr['home'];
     }
 }

and added the parameter 'multihomejail' =&gt; true to horde/gollem/config/backends.php . A sample ftp entry looks like this;

$backends['hordeftp'] = array(
    'name' =&gt; 'WebFTP',
    'driver' =&gt; 'ftp',
    'preferred' =&gt; '',
    'hordeauth' =&gt; true,
    'params' =&gt; array(
        'hostspec' =&gt; 'servername',
        'port' =&gt; 21,
        'pasv' =&gt; true,
        'vfsroot' =&gt; '',
       'permissions' =&gt; '700'
    ),
    'loginparams' =&gt; array(
    ),
    'root' =&gt; '',
    'home' =&gt; '',
    'multihomejail' =&gt; true,
    'clipboard' =&gt; true,
    'attributes' =&gt; array('type', 'name', 'edit', 'download', 'modified', 'size', 'permission', 'owner', 'group')
);

Best regards,

Emre Sezginer
horde-tr team
horde-tr.at.metu.edu.tr</description>
   <pubDate>Wed, 12 Mar 2008 12:56:17 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/6435#t43748</link>
  </item>
  <item>
   <title>Did you try root = '~' and home = ''? home = './' doesn't lo</title>
   <description>Did you try root = '~' and home = ''? home = './' doesn't look correct to me.</description>
   <pubDate>Thu, 13 Mar 2008 07:14:27 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/6435#t43800</link>
  </item>
  <item>
   <title>Yes. It leads to the error: &quot;Backend Configuration Error: Ho</title>
   <description>Yes. It leads to the error: &quot;Backend Configuration Error: Home directory not below root.&quot;

Emre.

&gt; Did you try root = '~' and home = ''? home = './' doesn't look correct to me.
</description>
   <pubDate>Thu, 13 Mar 2008 07:47:42 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/6435#t43807</link>
  </item>
  

 </channel>
</rss>
