Differences

This shows you the differences between two versions of the page.

docs:phppathfinder [2010/01/10 01:20]
attilio pavone
docs:phppathfinder [2010/01/10 05:37] (current)
attilio pavone
Line 7: Line 7:
You can view an online demo here: You can view an online demo here:
[[http://lnx.utillyty.eu/utillyty.php/pathfinder|online demo]] [[http://lnx.utillyty.eu/utillyty.php/pathfinder|online demo]]
 +
 +<note warning>
 +Tested on
 +  * Firefox 3.5
 +  * Opera 10.10
 +  * Safari 3.0
 +  * Chrome 3.0
 +  * Internet Explorer 8.0
 +  * Konqueror 3.5
 +</note>
===== Download ===== ===== Download =====
-last stable version: **0.1.0, 09 Jan 2010**+last stable version: **0.1.0, 10 Jan 2010**
-You can get phpPathFinder from+phpPathFinder comes as part of **utillyt.php** (still under development).\\ 
 +You can get it from
[[http://sourceforge.net/projects/phppathfinder]] [[http://sourceforge.net/projects/phppathfinder]]
===== Install ===== ===== Install =====
-Download and extract the latest release archive.\\ +Download and extract the latest **utillyty.php** release archive from [[https://sourceforge.net/projects/phppathfinder/|sourceforge]].\\ 
-Edit config.php and .pfaccess for your requirements (see [[docs:phppathfinder#configuration|Configuration]] below).\\+Enter the pathfinder folder and edit config.php and .pfaccess for your requirements (see [[docs:phppathfinder#configuration|Configuration]] below).\\
FTP to your site.\\ FTP to your site.\\
<note>PHP 5.3.1 or later required</note> <note>PHP 5.3.1 or later required</note>
 +<note important>
 +phpPathFinder comes as part of utillyty.php.\\
 +You need the entire utillyty.php folder to get it working.
 +</note>
===== Configuration ===== ===== Configuration =====
Before running phpPathFinder you must configure it. Before running phpPathFinder you must configure it.
-There are twe file you must edit to set cofiguration:+Enter the ..utillyty.php/pathfinder folder. There are two file you must edit to set configuration:
  * config.php   * config.php
  * .pfaccess (path-finder access)   * .pfaccess (path-finder access)
Line 84: Line 99:
There are 8 configurable permission parameters: There are 8 configurable permission parameters:
  * **root**: the absolute or relative (to phpPathFinder.php) path of the top folder the user can work on (mandatory);   * **root**: the absolute or relative (to phpPathFinder.php) path of the top folder the user can work on (mandatory);
-  * **whitelist**: a dot ('.') separated list of file extension the user can work on (default = ''); +  * **whitelist**: a dot ('.') separated list of file extension the user can work on (default = empty); 
-  * **blacklist**: a dot ('.') separated list of file extension the user is forbidden to work on (default = '');+  * **blacklist**: a dot ('.') separated list of file extension the user is forbidden to work on (default = empty);
  * **browse**: 0 or 1. if 1 the user can browse files/folders (default = 0)   * **browse**: 0 or 1. if 1 the user can browse files/folders (default = 0)
  * **download**: 0 or 1. if 1 the user can download (default = 0)   * **download**: 0 or 1. if 1 the user can download (default = 0)
Line 92: Line 107:
  * **upload**: 0 or 1. if 1 the user can upload files (default = 0);   * **upload**: 0 or 1. if 1 the user can upload files (default = 0);
-Only the root parameters, all others have defaults.+Only the root parameter is mandatory, all others have defaults.
Each permission is independent from the others Each permission is independent from the others
Line 99: Line 114:
Each record is a text line with a comma separated name/value list of parameters.\\ Each record is a text line with a comma separated name/value list of parameters.\\
Each parameter is in the form: 'name:value'.\\ Each parameter is in the form: 'name:value'.\\
-You can put line comments anywhere in the file, except the @passwords section) using the '#' token.\\+You can put line comments anywhere in the file, **except the @passwords section**, using the '#' token.\\
-**Sections**:+== Sections ==
== @default == == @default ==
-This section contains one record with the default user permissions parameters either for anonymous user, or if a parameter is not explicitly declared neither in the group nor in the user record of a logged user. +This section contains one record with the default user permissions parameters either for anonymous user, or if a parameter is not explicitly declared neither in the group nor in the user record of a logged user.\\ 
-<code>+Syntax:\\
username:@anonymous, group:@anonymous, root: [, browse: , download: , edit: , remove: , upload: , whitelist: , blacklist] username:@anonymous, group:@anonymous, root: [, browse: , download: , edit: , remove: , upload: , whitelist: , blacklist]
-</code> 
<note important> <note important>
'@anonymous' is a RESERVED key value for the @default user username, and group name and will be set automatically by the system. You cannot use this values for users records. '@anonymous' is a RESERVED key value for the @default user username, and group name and will be set automatically by the system. You cannot use this values for users records.
Line 113: Line 127:
== @groups == == @groups ==
-This section contains group permissions parameters for logged users.+This section contains group permissions parameters for logged users.\\ 
 +Syntax:\\
username:, group: [, root: , browse: , download: , edit: , remove: , upload: , whitelist: , blacklist] username:, group: [, root: , browse: , download: , edit: , remove: , upload: , whitelist: , blacklist]
== @users == == @users ==
-Each line on this section contains the user's user name and group name. Optionally authorization parameter in the group section can be overridden here.+Each line on this section contains the user's user name and group name. Optionally authorization parameter in the group section can be overridden here.\\ 
 +Syntax:\\
name: [, root: , browse: , download: , edit: , remove: , upload: , whitelist: , blacklist] name: [, root: , browse: , download: , edit: , remove: , upload: , whitelist: , blacklist]
== @passwords == == @passwords ==
-Each line contain a record with username and MD5 encryped password.+Each line contain a record with username and MD5 encryped password.\\ 
 +Syntax:\\ 
 +username:MD5password\\ 
 + 
 +== Precedence ==
When a user log in to phpPathFinder, the system first check the username and password, When a user log in to phpPathFinder, the system first check the username and password,
Line 136: Line 156:
<note important> <note important>
Remember to instruct your web server not to allow direct access to the root folder, i.e. by means of an .htaccess file (view .htacees_sample file). Remember to instruct your web server not to allow direct access to the root folder, i.e. by means of an .htaccess file (view .htacees_sample file).
-<note>+</note>
-The full content of a .pfaccess file follows:+The full content of a .pfaccess sample file follows:
<code> <code>
-# default ====================================================================== +# default ==================== 
-# this section store user persmission for anonymous user +
-# if you don't want anonymous user not even browse list, remove the browse permission +
-# NB: '@anonymous' is a RESERVED key value for username, group, password and will be set automatically+
@default @default
-username: @anonymous, group: @anonymous, root: ../test/playground, browse:1, whitelist: , blacklist:.php.php3.php4.php5.phps.phtml.html.htm.xhtml.asp.aspx.js.vb.xsl.perl.pl.py.ruby.exe.dll.so.java.jsp.jar.do.json+root: ../test/playground, browse:1, blacklist:.php.asp.perl
-# groups ====================================================================== +# groups =====================
-#  +
-# name: , root: [, browse: , download: , edit: , remove: , upload: , whitelist: , blacklist: ]+
@groups @groups
Line 158: Line 174:
name: guests, root: ../test/playground, download: 1 name: guests, root: ../test/playground, download: 1
-# users ======================================================================= +# users ======================
-+
-# username: , group: [, root: , browse: , download: , edit: , remove: , upload: , whitelist: , blacklist]+
   
@users @users
Line 169: Line 183:
-# passwords =======================================================================+# passwords ==================
# #
# <username>:password # <username>:password
-# NB: you can't put any comment in this section!+# NB: you can't put any comment below this section!
@passwords @passwords
Line 206: Line 220:
===== Develope ===== ===== Develope =====
 +
 +**utillyty.php** cvs repository is stored at:
 +[[https://sourceforge.net/projects/u-omnibus/|UTillyty.Omnibus]] under the utillyty.php cvs module.
===== Revision history ===== ===== Revision history =====
Line 213: Line 230:
This is the first alpha version. This is the first alpha version.
 +===== Forum =====
 +
 +[[talk:docs:phppathfinder|Talk:phpPathFinder]]

Navigation
Personal Tools