6.0.0-git
2020-11-28

Diff for GollemFtpJail between 3 and 4

+ Specifying multi-domain jails in Gollem FTP



Not exactly documented, most people may assume that setting an FTP jail is restricted to absolute paths in Gollem's {{ backend.php }}.



This is clearly not suitable for servers where users log into virtual sites under different domains. Two styles of jails are then desired:

# The user is restricted to {{ /path/to/site-root/home/user }}

## The user is restricted to {{ /path/to/site-root }} (suitable for site owners)



Trouble is, the site-root location is a variable.

----

(section describing userhome-relative paths for root and home deleted)

----

(later...)

(later...)

Turns out the problem was wrongly posed.

* FTP jail is normally handled by the FTP server in its configuration. proftp for example allows domain-specific jails. Fine.

* ''Problem'' is actually to dynamically set 'hostspec' to be the current user's domain so that one-click login to ftp works with correct ftp-server-resolving of appropriate jail root.



Is for example the current domain running horde available as

 'hostspec' => $GLOBALS['something...'],

For that matter, is there any quick way to see what global values are available?
----

Possible solutions...

 'hostspec' => $_SERVER['SERVER_NAME'],
which would howver need to be recast from e.g. 'webmail.example.com' to 'ftp.example.com'

For that matter, is there any quick wayAnd if ftp-login to see what global values are available?
explicit IP correctly references the appropriate virtual server configuration for jail path:
 'hostspec' => $_SERVER['SERVER_ADDR'],

The last works in my setup at least.