[6779] | 1 | INSTALL : WebDAV file share |
---|
| 2 | --------------------------- |
---|
| 3 | Note: if you don't know what WebDAV is you probably don't need it. The default |
---|
| 4 | vfs_sql is generally faster and easier to setup. |
---|
| 5 | |
---|
| 6 | Filemanager's WebDAV support allows you to store your files online in |
---|
| 7 | egroupware, in a way that cooperates well with other web applications (for |
---|
| 8 | instance, in Windows you can then access your files as a "web folder", and |
---|
| 9 | similarly KDE, Gnome, MacOSX, and amultitude of applications (eg MS Office and |
---|
| 10 | OpenOffice.org) all include some way of browsing files on a WebDAV share) |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | Installation |
---|
| 14 | ------------ |
---|
| 15 | To install: |
---|
| 16 | |
---|
| 17 | 1/ Setup a WebDAV server - currently this code has only been well tested using |
---|
| 18 | Apache's mod_dav (http://www.webdav.org/mod_dav/). mod_dav is included in |
---|
| 19 | Apache 2, and most Linux distributions include it as a package. |
---|
| 20 | |
---|
| 21 | To setup mod_dav ensure that you have the module installed correctly ( RTFM :) |
---|
| 22 | and create a virtual host (eg files.yourdomain.com) something like this: |
---|
| 23 | |
---|
| 24 | <VirtualHost files.yourdomain.com:80> |
---|
| 25 | AccessFileName .htaccess |
---|
| 26 | ServerAdmin webmaster@yourdomain.com |
---|
| 27 | DocumentRoot /var/files |
---|
| 28 | <Location /> |
---|
| 29 | AllowOverride All |
---|
| 30 | Options +Indexes |
---|
| 31 | DAV on |
---|
| 32 | DirectoryIndex / |
---|
| 33 | RemoveHandler cgi-script .cgi .pl |
---|
| 34 | RemoveType application/x-httpd-php .php .php3 |
---|
| 35 | RemoveType application/x-httpd-php-source .phps |
---|
| 36 | </Location> |
---|
| 37 | <Files ~ "^\.ht"> |
---|
| 38 | #This ensures egroupware can modify .htaccess files |
---|
| 39 | order deny,allow |
---|
| 40 | deny from all |
---|
| 41 | #make sure your egroupware server is included here. |
---|
| 42 | allow from localhost .localdomain |
---|
| 43 | </Files> |
---|
| 44 | ServerName files.yourdomain.com |
---|
| 45 | ErrorLog logs/dav_err |
---|
| 46 | CustomLog logs/dav_acc combined |
---|
| 47 | </VirtualHost> |
---|
| 48 | |
---|
| 49 | 2/ On the setup page (egroupware/setup/config.php) specify |
---|
| 50 | the WebDAV server URL (eg http://files.yourdomain.com ) in the: "Full path |
---|
| 51 | for users and groups files" text area, and select DAV in the: |
---|
| 52 | "Select where you want to store/retrieve filesystem information" |
---|
| 53 | combo. If your file repository supports SSL you might want to enter |
---|
| 54 | 'https://files.yourdomain.com' instead - note that phpGroupWare itself wont |
---|
| 55 | use SSL to access the repository, but when it redirects the users browser to |
---|
| 56 | the repository it will use the secure https url. |
---|
| 57 | |
---|
| 58 | 3/ Make sure your WebDAV repository contains a "home" directory (important!) |
---|
| 59 | So if your WebDAV directory is /var/files, you would need: |
---|
| 60 | /var/files/ |
---|
| 61 | /var/files/home/ |
---|
| 62 | |
---|
| 63 | 4/ You now want some kind of authentication on the WebDAV repository, so that |
---|
| 64 | users accessing it directly still need their egroupware password. By default |
---|
| 65 | there is no security through Apache's WebDAV module and anyone could access |
---|
| 66 | your files. |
---|
| 67 | |
---|
| 68 | To enable authentication you must use a third-party Apache authentication |
---|
| 69 | module. Which you use depends on how you have setup authentication in |
---|
| 70 | phpGroupWare - for instance if you use an SQL DB (the default) then set up |
---|
| 71 | mod_auth_pgsql (http://www.giuseppetanzilli.it/mod_auth_pgsql/) or |
---|
| 72 | mod_auth_mysql (http://modauthmysql.sourceforge.net/) |
---|
| 73 | |
---|
| 74 | An example .htaccess file for your repository's root |
---|
| 75 | (e.g. /var/files) when using mod_auth_mysql would be: |
---|
| 76 | |
---|
| 77 | Options None |
---|
| 78 | DirectoryIndex index.html |
---|
| 79 | RemoveHandler cgi-script .cgi .pl |
---|
| 80 | RemoveType application/x-httpd-php .php .php3 |
---|
| 81 | RemoveType application/x-httpd-php-source .phps |
---|
| 82 | |
---|
| 83 | AuthMySQL_Host localhost |
---|
| 84 | AuthMySQL_User <mysql user> |
---|
| 85 | AuthMySQL_Password <mysql password> |
---|
| 86 | Auth_MySQL_DB <mysql egroupware database> |
---|
| 87 | |
---|
| 88 | AuthMySQL_Password_Table "phpgw_accounts AS users" |
---|
| 89 | AuthMySQL_Username_Field users.account_lid |
---|
| 90 | AuthMySQL_Password_Field account_pwd |
---|
| 91 | |
---|
| 92 | Auth_MySQL_Encryption_Types PHP_MD5 |
---|
| 93 | |
---|
| 94 | AuthName "V-Manager" |
---|
| 95 | AuthType Basic |
---|
| 96 | require valid-user |
---|
| 97 | |
---|
| 98 | eGroupWare's WebDAV vfs class has some support for adding |
---|
| 99 | .htaccess files when creating new directories but does not do |
---|
| 100 | so when creating a new directory for a new user so you will |
---|
| 101 | need to do this by hand or modify the vfs_dav class. The .htaccess |
---|
| 102 | file would look like "require user <username>" |
---|
| 103 | |
---|
| 104 | Filemanager also supports group directories. Add the |
---|
| 105 | following to the .htaccess file: |
---|
| 106 | |
---|
| 107 | AuthMySQL_Group_Table "phpgw_accounts AS groups, phpgw_accounts AS users, phpgw_acl AS acl" |
---|
| 108 | Auth_MySQL_Group_Field groups.account_lid |
---|
| 109 | Auth_MySQL_Group_Clause " AND groups.account_type='g' AND users.account_type='u' AND groups.account_id=acl.acl_location AND users.account_id=acl.acl_account AND groups.account_lid='Admins'" |
---|
| 110 | |
---|
| 111 | And finally make the group directories by hand: |
---|
| 112 | |
---|
| 113 | mkdir home/Admins; mkdir home/Default |
---|
| 114 | |
---|
| 115 | and each directory's .htaccess file by hand: |
---|
| 116 | |
---|
| 117 | require group Admins |
---|
| 118 | |
---|
| 119 | TODO: |
---|
| 120 | |
---|
| 121 | Create group directories automaticly |
---|
| 122 | Create .htaccess file for group directories automaticly |
---|
| 123 | Create .htaccess files for new user directories automaticly |
---|
| 124 | Only list group directories to which the user has access |
---|