<?php /** * $Horde: gollem/config/backends.php.dist,v 1.41.2.7 2006/11/27 03:32:40 slusarz Exp $ * * This file is where you specify what backends people using your * installation of Gollem can log in to. There are a number of properties * that you can set for each backend: * * name: This is the plaintext name that you want displayed if you are using * the drop down server list. * * driver: The VFS (Virtual File System) driver to use to connect. * Valid options: * 'file' -- Work with a local file system. * 'ftp' -- Connect to a FTP server. * 'sql' -- Connect to VFS filesystem stored in SQL database. * * preferred: This is only useful if you want to use the same backend.php * file for different machines: if the hostname of the Gollem * machine is identical to one of those in the preferred list, * then the corresponding option in the select box will include * SELECTED, i.e. it is selected by default. Otherwise the * first entry in the list is selected. * * hordeauth: If this parameter is present and true, then Gollem will attempt * to use the user's existing credentials (the username/password * they used to log in to Horde) to log in to this source. If this * parameter is 'full', the username will be used unmodified; * otherwise, everything after and including the first @ in the * username will be stripped before attempting authentication. * * params: A parameters array containing any additional information that the * VFS driver needs. * * loginparams: A list of parameters that can be changed by the user on the * login screen. The key is the parameter name that can be * changed, the value is the text that will be displayed next to * the entry box on the login screen. * * root: The directory that will be the "top" or "root" directory, being the * topmost directory where users can change to. This is in addition to * a vfsroot parameter set in the params array. * * home: The directory that will be used as home directory for the user. * This parameter will overrule a home parameter in the params array. * If empty, this will default to the active working directory * immediately after logging into the VFS backend (i.e. for ftp, * this will most likely be ~user, for SQL based VFS backends, * this will probably be the root directory). * * createhome: If this parameter is set to true, and the home directory does * not exist, attempt to create the home directory on login. * * filter: If set, all files that match the regex will be hidden in the * folder view. The regex must be in pcre syntax (See * http://www.php.net/pcre). * * quota: If set, turn on VFS quota checking for the backend if it supports * it. The entry must be in the following format: * size [metric] * metric = B (bytes), KB (kilobytes), MB (megabytes), GB (gigabytes) * If no metric is given, bytes are assumed. * Examples: "2 MB", "2048 B", "1.5 GB" * If false or not set, quota support is disabled. * * ** For quotas to work, you must be using a version of Horde ** * ** that contains VFS quota support. ** * * clipboard: If set, allows the user to cut/copy/paste files. Since not all * VFS backends have support for the necessary commands, and there * is no way to auto-detect which backends do have support, this * option must be manually set. True enables clipboard support, * false (the default) disables support. In the examples below, * clipboard has been enabled in all VFS backends that have * cut/copy/paste support since the initial release of Horde 3.0. * For all other backends, you will have to manually check and * see if your current VFS version/backend supports the necessary * commands. * * attributes: The list of attributes that the driver supports. Available * attributes: * 'download' * 'group' * 'modified' * 'name' * 'owner' * 'permission' * 'size' * 'type' */ // FTP Example. $backends['ftp'] = array( 'name' => 'FTP Server', 'driver' => 'ftp', 'preferred' => '', 'hordeauth' => false, 'params' => array( // The hostname/IP Address of the FTP server 'hostspec' => 'ftp.example.com', // The port number of the FTP server 'port' => 21, // Use passive mode? 'pasv' => false, // Set timeout (in seconds) for the FTP server. Default: 90 seconds // 'timeout' => 90, // If true and the POSIX extension is available the driver will map // the user and group IDs returned from the FTP server with the local // IDs from the local password file. This is useful only if the FTP // server is running on localhost or if the local user/group // IDs are identical to the remote FTP server. // 'maplocalids' => true, // The default permissions to set for newly created folders and files. // 'permissions' => '750' ), 'loginparams' => array( // Allow the user to change the FTP server // 'hostspec' => 'Hostname', // Allow the user to change the FTP port // 'port' => 'Port' ), // 'root' => '', // 'home' => '', // 'createhome' => false, // 'filter' => '^regex$', // 'quota' => false, 'clipboard' => true, 'attributes' => array('type', 'name', 'download', 'modified', 'size', 'permission', 'owner', 'group') ); // This backend uses Horde credentials to automatically log in. $backends['hordeftp'] = array( 'name' => 'FTP Server', 'driver' => 'ftp', 'preferred' => '', 'hordeauth' => true, 'params' => array( // The hostname/IP Address of the FTP server. 'hostspec' => 'ftp.example.com', // The port number of the FTP server. 'port' => 21, // Use passive mode? 'pasv' => false, // Set timeout (in seconds) for the FTP server. Default: 90 seconds // 'timeout' => 90, // If true and the POSIX extension is available the driver will map // the user and group IDs returned from the FTP server with the local // IDs from the local password file. This is useful only if the FTP // server is running on localhost or if the local user/group // IDs are identical to the remote FTP server. // You must be running a version of Horde >= 3.1 for this parameter to // have any effect. // 'maplocalids' => true, // The default permissions to set for newly created folders and files. // 'permissions' => '750' ), 'loginparams' => array( // Allow the user to change the FTP server. // 'hostspec' => 'Hostname', // Allow the user to change the FTP port. // 'port' => 'Port' ), // 'root' => '', // 'home' => '', // 'createhome' => false, // 'filter' => '^regex$', // 'quota' => false, 'clipboard' => true, 'attributes' => array('type', 'name', 'download', 'modified', 'size', 'permission', 'owner', 'group') ); // SQL Example. $backends['sql'] = array( 'name' => 'SQL Server', 'driver' => 'sql', 'preferred' => '', 'hordeauth' => false, // The default connection details are pulled from the Horde-wide SQL // connection configuration. 'params' => array_merge($GLOBALS['conf']['sql'], array('table' => 'horde_vfs')), // If you need different connection details than from the Horde-wide SQL // connection configuration, uncomment and set the following lines. // 'params' => array( // // The SQL connection parameters. See horde/config/conf.php for // // descriptions of each parameter. // 'phptype' => 'mysql', // 'hostspec' => 'localhost', // 'database' => 'horde', // 'username' => 'horde', // 'password' => 'horde', // // // The SQL table containing the VFS. See the horde/scripts/db // // directory for examples. // 'table' => 'horde_vfs' // ), 'loginparams' => array(), // 'root' => '', // 'home' => '', // 'createhome' => false, // 'filter' => '^regex$', // 'quota' => false, 'clipboard' => false, 'attributes' => array('type', 'name', 'download', 'modified', 'size', 'permission', 'owner', 'group') ); // This backend specifies a home directory and root directory in a SQL vfs. $backends['sqlhome'] = array( 'name' => 'SQL Server with home', 'driver' => 'sql', 'preferred' => '', 'hordeauth' => false, // The default connection details are pulled from the Horde-wide SQL // connection configuration. 'params' => array_merge($GLOBALS['conf']['sql'], array('table' => 'horde_vfs')), // If you need different connection details than from the Horde-wide SQL // connection configuration, uncomment and set the following lines. // 'params' => array( // // The SQL connection parameters. See horde/config/conf.php for // // descriptions of each parameter. // 'phptype' => 'mysql', // 'hostspec' => 'localhost', // 'database' => 'horde', // 'username' => 'horde', // 'password' => 'horde', // // // The SQL table containing the VFS. See the horde/scripts/db // // directory for examples. // 'table' => 'horde_vfs' // ), 'loginparams' => array(), 'root' => '/home', 'home' => '/home/' . Auth::getAuth(), // 'createhome' => false, // 'filter' => '^regex$', // 'quota' => false, 'clipboard' => false, 'attributes' => array('type', 'name', 'download', 'modified', 'size', 'permission', 'owner', 'group'), ); // NOTE: /exampledir/home and all subdirectories should be, for // security reasons, owned by your web server user and mode 700 or you // will need to use suexec or something else that can adjust the web // server effective uid. $backends['file'] = array( 'name' => 'Virtual Home Directories', 'driver' => 'file', 'preferred' => '', 'hordeauth' => false, 'params' => array( // The base location under which the user home directories live. 'vfsroot' => '/exampledir/home/', // The default permissions to set for newly created folders and files. // 'permissions' => $conf['umask'] ), 'loginparams' => array(), 'root' => '/', 'home' => Auth::getAuth(), // 'createhome' => false, // 'filter' => '^regex$', // 'quota' => false, 'clipboard' => true, 'attributes' => array('type', 'name', 'download', 'modified', 'size', 'permission', 'owner', 'group') ); // SMB Example // ** For the SMB backend to work, you must be using a version of Horde // ** that contains the SMB VFS driver. See the test.php script to determine // ** whether the SMB driver is present on your system. // $backends['smb'] = array( // 'name' => 'SMB Server', // 'driver' => 'smb', // 'preferred' => '', // 'hordeauth' => false, // 'params' => array( // 'hostspec' => 'example', // 'port' => 139, // 'share' => 'homes', // // Path to the smbclient executable. // 'smbclient' => '/usr/bin/smbclient', // // IP address of server (only needed if hostname is different from // // NetBIOS name). // // 'ipaddress' => '127.0.0.1', // // The default permissions to set for newly created folders and // // files. // // 'permissions' => '750' // ), // 'loginparams' => array( // // Allow the user to change to Samba server. // // 'hostspec' => 'Hostname', // // Allow the user to change the Samba port. // // 'port' => 'Port', // // Allow the user to change the Samba share. // // 'share' => 'Share', // ), // // 'root' => '', // // 'home' => '', // // 'createhome' => false, // // 'filter' => '^regex$', // // 'quota' => false, // 'clipboard' => true, // 'attributes' => array('type', 'name', 'download', 'modified', 'size') // );