diff -Naur --exclude=header.inc.php --exclude=CVS ../orig/phpgroupware/filemanager/doc/INSTALL ./filemanager/doc/INSTALL --- ../orig/phpgroupware/filemanager/doc/INSTALL Thu Jul 3 18:04:29 2003 +++ ./filemanager/doc/INSTALL Thu Jan 1 00:00:00 1970 @@ -1,45 +0,0 @@ -INSTALL -------- -Command examples are suggestions only. Use your head. - -COMMAND SUMMARY ---------------- -cp -a /some/path/to/phpgroupware/files /path/to/files -cd /path/to/files -chown -R nobody . --OR- -chmod -R 777 . - -http://yourhost.com/setup/ > Setup/Config > Edit Current Configuration -"Enter the full path for users and group files" => /path/to/files - -FULL EXPLANATION ----------------- -[REQUIRED] Copy phpgroupware/files to where you want to store the files. - THIS SHOULD BE SOMEWHERE NOT INSIDE THE WEBROOT AND NOT ACCESSIBLE TO THE WEB. - Having the files within the webroot is a huge security risk as well as a privacy concern. - The exception to this would be if you WANT the users' and groups' files to be accessible - from the web, such as when setting up public or semi-public web page/document hosting. In - this case, the files directory can be left where it is. - (Make sure you copy the directory, don't just make a new one. The necessary directories - are files/ and files/home/) -[REQUIRED] In http://yourhost.com/setup, login to Setup/Config, then Edit Current Configuration. Enter the FULL path for the files directory you created earlier in the second box from the top. -[REQUIRED] Change permissions for files directory and all it's subdirectories to be writable by Apache - This is the files directory you created earlier and specified in setup (Edit Current Configuration). Note that 'nobody' below could also be 'apache' on your system. Check the 'User' setting in your httpd.conf. - cd /path/to/files - chown -R nobody . - -OR- - chmod -R 777 . - -SECURITY CONCERNS ------------------ -There are many security concerns related with allowing users to store files on the server. The most common problem is that users can upload any type of file, including CGI and PHP scripts. This in effect grants them local access to the machine, and can be used to read database passwords and other sensitive files. The ability to upload files of any type is not forbidden by filemanager because it is sometimes desired, and also the types of vulnerable files differ from server to server. To combat this, you can add a simple entry to Apache's httpd.conf to prevent certain types of files from being executed. Included below is an example that results in .cgi, .pl, .php, .php3, and .phps files being treated as normal text files. It also explicitly turns all Options off, which includes turning Indexes (listing of files) off. - - -Options None -AllowOverride None -DirectoryIndex index.html -RemoveHandler cgi-script .cgi .pl -RemoveType application/x-httpd-php .php .php3 -RemoveType application/x-httpd-php-source .phps - diff -Naur --exclude=header.inc.php --exclude=CVS ../orig/phpgroupware/filemanager/doc/README ./filemanager/doc/README --- ../orig/phpgroupware/filemanager/doc/README Thu Jul 3 18:04:29 2003 +++ ./filemanager/doc/README Thu Jul 3 18:05:16 2003 @@ -7,7 +7,7 @@ ----- filemanager started as an independent (non-phpGroupWare) project named phpwebhosting, and there continues to be a separate stand-alone distribution available at http://phpwebhosting.sourceforge.net/. -For installation help, see the INSTALL file in this directory. +For installation help, see the INSTALL file in the phpgwapi/doc/vfs directory. DEV NOTES --------- diff -Naur --exclude=header.inc.php --exclude=CVS ../orig/phpgroupware/phpgwapi/doc/vfs/INSTALL ./phpgwapi/doc/vfs/INSTALL --- ../orig/phpgroupware/phpgwapi/doc/vfs/INSTALL Thu Jan 1 00:00:00 1970 +++ ./phpgwapi/doc/vfs/INSTALL Thu Jul 3 18:05:38 2003 @@ -0,0 +1,60 @@ +INSTALL +------- +Command examples are suggestions only. Use your head. + +COMMAND SUMMARY +--------------- +cp -a /some/path/to/phpgroupware/files /path/to/files +cd /path/to/files +chown -R nobody . + +http://yourhost.com/setup/ > Setup/Config > Edit Current Configuration +"Enter the full path for users and group files" => /path/to/files + +FULL EXPLANATION +---------------- +[REQUIRED] Copy phpgroupware/files to where you want to store the files. + THIS SHOULD BE SOMEWHERE NOT INSIDE THE WEBROOT AND NOT ACCESSIBLE TO THE + WEB. Having the files within the webroot is a huge security risk as well as + a privacy concern. The exception to this would be if you WANT the users' + and groups' files to be accessible from the web, such as when setting up + public or semi-public web page/document hosting. In this case, the files + directory can be left where it is. (Make sure you copy the directory, don't + just make a new one. The necessary directories are files/ and files/home/) + +[REQUIRED] In http://yourhost.com/setup, login to Setup/Config, then Edit + Current Configuration. Enter the FULL path for the files directory you + created earlier in the second box from the top. + +[REQUIRED] Change permissions for files directory and all it's + subdirectories to be writable by Apache This is the files directory you + created earlier and specified in setup (Edit Current Configuration). Note + that 'nobody' below could also be 'apache' on your system. Check the 'User' + setting in your httpd.conf. + + cd /path/to/files + chown -R nobody . + +SECURITY CONCERNS +----------------- +There are many security concerns related with allowing users to store files +on the server. The most common problem is that users can upload any type of +file, including CGI and PHP scripts. This in effect grants them local +access to the machine, and can be used to read database passwords and other +sensitive files. The ability to upload files of any type is not forbidden +by filemanager because it is sometimes desired, and also the types of +vulnerable files differ from server to server. To combat this, you can add +a simple entry to Apache's httpd.conf to prevent certain types of files from +being executed. Included below is an example that results in .cgi, .pl, +.php, .php3, and .phps files being treated as normal text files. It also +explicitly turns all Options off, which includes turning Indexes (listing of +files) off. + + +Options None +AllowOverride None +DirectoryIndex index.html +RemoveHandler cgi-script .cgi .pl +RemoveType application/x-httpd-php .php .php3 +RemoveType application/x-httpd-php-source .phps + diff -Naur --exclude=header.inc.php --exclude=CVS ../orig/phpgroupware/setup/config.php ./setup/config.php --- ../orig/phpgroupware/setup/config.php Thu Jul 3 18:04:31 2003 +++ ./setup/config.php Thu Jul 3 18:06:49 2003 @@ -47,7 +47,8 @@ /* Guessing default values. */ $GLOBALS['current_config']['hostname'] = $HTTP_HOST; - $GLOBALS['current_config']['files_dir'] = ereg_replace('/setup','/files',dirname($SCRIPT_FILENAME)); + $GLOBALS['current_config']['files_dir'] = '/outside/webserver/docroot'; + if(@is_dir('/tmp')) { $GLOBALS['current_config']['temp_dir'] = '/tmp'; @@ -150,11 +151,6 @@ while(@$GLOBALS['phpgw_setup']->db->next_record()) { $GLOBALS['current_config'][$GLOBALS['phpgw_setup']->db->f('config_name')] = $GLOBALS['phpgw_setup']->db->f('config_value'); - } - - if($GLOBALS['current_config']['files_dir'] == '/path/to/dir/phpgroupware/files') - { - $GLOBALS['current_config']['files_dir'] = $GLOBALS['phpgw_info']['server']['server_root'] . '/files'; } if($GLOBALS['error'] == 'badldapconnection') diff -Naur --exclude=header.inc.php --exclude=CVS ../orig/phpgroupware/setup/templates/default/config.tpl ./setup/templates/default/config.tpl --- ../orig/phpgroupware/setup/templates/default/config.tpl Thu Jul 3 18:04:31 2003 +++ ./setup/templates/default/config.tpl Thu Jul 3 18:07:35 2003 @@ -23,7 +23,7 @@ - {lang_Enter_the_full_path_for_users_and_group_files.
Examples:_/files,_E:\FILES,
http://webdav.domain.com (WebDAV)}: + {lang_Enter_the_full_path_for_users_and_group_files.
Examples:_/files,_E:\FILES,
http://webdav.domain.com (WebDAV).
Note:_There_are_security_problems_when_the_files_directory_is_inside_the_webroot._Please_read_the_security_recommendations_before_choosing_a_files_path.}: