6.0.0-alpha10
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
5/15/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#6435] jail for multiple homes
*
Your Email Address
*
Spam protection
Enter the letters below:
__ .___.___.. . __ / `[__ _/ |_/ / ` \__.| ./__.| \\__.
Comment
> 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' => '/home' and a 'home' => > 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' => '~' and 'home' => './' which seems to be working until > you try to "cd" 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: > > "Make sure the home parameter lives under root ...." on line 127; > > > > if (!empty($ptr['multihomejail'])) { > > if ($ptr['multihomejail'] == true) { > > $ptr['home'] = $GLOBALS['gollem_vfs']->getCurrentDirectory(); > > $ptr['root'] = $ptr['home']; > > } > > } > > > > and added the parameter 'multihomejail' => true to > horde/gollem/config/backends.php . A sample ftp entry looks like this; > > > > $backends['hordeftp'] = array( > > 'name' => 'WebFTP', > > 'driver' => 'ftp', > > 'preferred' => '', > > 'hordeauth' => true, > > 'params' => array( > > 'hostspec' => 'servername', > > 'port' => 21, > > 'pasv' => true, > > 'vfsroot' => '', > > 'permissions' => '700' > > ), > > 'loginparams' => array( > > ), > > 'root' => '', > > 'home' => '', > > 'multihomejail' => true, > > 'clipboard' => true, > > 'attributes' => array('type', 'name', 'edit', 'download', > 'modified', 'size', 'permission', 'owner', 'group') > > ); > > > > Best regards, > > > > Emre Sezginer > > horde-tr team > > horde-tr.at.metu.edu.tr
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers