Commit d6e28ac27b6129a16a9366b0912988807f45c655

Authored by Neil Blakey-Milner
1 parent f883e664

Add .htaccess files with proper PHP settings, and preventing access to

non-web directories via the web.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3251 c91229c3-7414-0410-bfa2-8a42b809f60b
.htaccess 0 → 100644
  1 +# This file sets up the necessary PHP settings to run KnowledgeTree
  2 +# optimally.
  3 +#
  4 +# It is best that KnowledgeTree be allowed to manage its PHP and access
  5 +# permissions using these .htaccess files. This prevents direct access
  6 +# to libraries, scripts, and documents that should not be available via
  7 +# the web.
  8 +#
  9 +# By default, to facilitate quick testing of functionality,
  10 +# KnowledgeTree places the Documents directory within the KnowledgeTree
  11 +# web root. This, by default, would allow people to browse the
  12 +# documents in the DMS, bypassing the security permissions. The
  13 +# default .htaccess settings would prevent this.
  14 +#
  15 +# KnowledgeTree itself is able to deal with most PHP configurations,
  16 +# excepting "safe mode" currently, but is unable to handle certain
  17 +# inherent configuration options (for example, setting the upload size
  18 +# very low). Check the setup checklists (as described in the
  19 +# documentation) to see how your configuration is handled.
  20 +#
  21 +# The default .htaccess settings ensure that no workarounds occur in the
  22 +# PHP code, leading to better performance and robustness.
  23 +#
  24 +<IfModule mod_php4.c>
  25 +php_value upload_max_filesize 8M
  26 +php_value post_max_size 8M
  27 +php_value memory_limit 8M
  28 +php_value max_input_time -1
  29 +php_value max_execution_time 60
  30 +php_value default_mimetype text/html
  31 +php_value auto_prepend_file none
  32 +php_value auto_append_file none
  33 +php_flag display_startup_errors ON
  34 +php_flag display_errors ON
  35 +php_flag file_uploads ON
  36 +php_flag magic_quotes_gpc OFF
  37 +php_flag magic_quotes_runtime OFF
  38 +php_flag register_globals OFF
  39 +php_flag output_buffering OFF
  40 +php_flag session.auto_start OFF
  41 +</IfModule>
  42 +<IfModule mod_env.c>
  43 +SetEnv kt_htaccess_worked yes
  44 +</IfModule>
  45 +LimitRequestBody 0
Documents/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
bin/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
config/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
docs/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
etc/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
lib/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
log/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
pear/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
phpSniff/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
phpmailer/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
sql/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
sync/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all
tests/.htaccess 0 → 100644
  1 +Order deny,allow
  2 +Deny from all