]> git.p6c8.net - devedit.git/blob - README
Mention Artistic License 2.0 in README
[devedit.git] / README
1 ReadMe for Dev-Editor 3.2
2 =========================
3
4 Description
5 -----------
6
7 Dev-Editor is a simple CGI based editor written in Perl and licensed under the
8 terms of the Artistic License 2.0, which allows remote changes to files and
9 directory structures on a web server. That's useful if you aren't able to access
10 the files on your homepage directly, for example if you are on holiday.
11
12 Features
13 --------
14
15 - Browsing through directory structures
16 - Viewing text files
17 - Editing text files
18 - Removing files and directories
19 - Moving/renaming files and directories
20 - Copying files and directories
21 - Creating new files and directories
22 - Executing a HTTP download of a file
23 - Uploading files to the server via HTTP
24 - Changing permissions (chmod) and group (chgrp) of files and directories (on
25 Unix systems)
26 - Unpacking some types of archive files (Perl module Archive::Extract is
27 required - core module since Perl 5.10, I guess)
28
29 Installation
30 ------------
31
32 First, you have to copy the files into a directory on your web server where you
33 are able to execute scripts (in most cases, this is "cgi-bin"). I suggest to
34 create a sub directory for Dev-Editor.
35 Then, you have to change the first line of devedit.pl: Just replace
36 /usr/bin/perl by the path to your Perl interpreter.
37 If you are on a Unix based system, you have to set devedit.pl as executable
38 (chmod 755 in most cases).
39 You will also need to configure Dev-Editor. See the next section for details.
40
41 Note, that the directory where you installed Dev-Editor should be protected by
42 HTTP Authentication. If you don't do that, everybody will be able to access
43 Dev-Editor and use it for evil purposes.
44
45 Configuration
46 -------------
47
48 Open the file devedit.conf. This file contains keys and values separated by a
49 "=" sign. Lines beginning with a "#" sign are ignored.
50 Here is a list of the configuration options currently available:
51
52 Option Description
53 ------ -----------
54
55 fileroot The root directory Dev-Editor is allowed to access.
56 Nobody is allowed to access the files and directories
57 above this directory. Dev-Editor needs write access to
58 this directory and to the sub directories.
59
60 httproot This is the equivalent HTTP URL to the root directory.
61 It's just used for visual output, so it doesn't need to
62 be correct.
63
64 startdir Here you may define the default directory Dev-Editor
65 opens on start.
66
67 max_file_size Here you may define a maximum size for files (Bytes).
68 If the user wants to view or edit a file larger than
69 this defined size, Dev-Editor denies file access (but
70 the file can still be copied, renamed or removed).
71 If this is empty or 0, any file can be viewed or
72 edited.
73
74 timeformat The format of the time shown in directory listings.
75 These are the most important placeholders:
76
77 %a - short day name (Sun to Sat)
78 %A - long day name (Sunday to Saturday)
79 %b - short month name (Jan to Dec)
80 %B - long month name (January to December)
81 %d - day of the month (01 to 31)
82 %H - hour in 24 hour clock (00 to 23)
83 %I - hour in 12 hour clock (01 to 12)
84 %m - month of the year (01 to 12)
85 %M - minutes (00 to 59)
86 %p - AM or PM
87 %S - seconds (00 to 59)
88 %y - two digit year (03)
89 %Y - four digit year (2003)
90 %% - percent sign
91
92 There are a lot of other placeholders. A complete list
93 is found at:
94 http://www.opengroup.org/onlinepubs/7908799/xsh/strftime.html
95 Note that some systems don't support some of the
96 placeholders (for example %T on Windows).
97
98 This format is also used to format the system time in
99 the About dialogue.
100
101 use_gmt Set this option to 1 if you want to use Greenwich Mean
102 Time (GMT/UTC) in directory listing and in the About
103 dialogue instead of the local time.
104
105 hide_dot_files Set this option to 1 if you want to hide files or
106 directories beginning with a dot (e.g. ".htaccess") in
107 directory listing.
108 The files are just hidden in the directory listing,
109 you can still access them typing the name into the
110 "Go to directory/file" box.
111
112 forbidden Specify a list of filenames the user is not allowed to
113 access. The filenames have to be relative to the
114 virtual root directory (they must also begin with a
115 slash) and have to be separated by space characters. If
116 a filename contains space characters, you have to put
117 it into double quotation marks ("/file name").
118
119 disable_commands Specify a list of commands the user is not allowed to
120 execute. The commands have to be separated by space
121 characters.
122 If you add "@write" to the list, all writing commands
123 (for example edit, copy, rename etc.) get disabled.
124
125 userconf_file Specifies the path to a file which contains
126 user-dependent configuration options (see next section
127 for details).
128
129 error_file The path to the file which defines the error messages.
130 The file has the same format as this one.
131
132 template_file The path to the file which defines the paths to the
133 template files. The file has the same format as this
134 one.
135
136 User-dependent configuration
137 ----------------------------
138
139 If you have placed Dev-Editor inside a directory protected using HTTP
140 authentication, you may override some default configuration values for a defined
141 list of users. You may override the values for the following configuration
142 options:
143
144 - fileroot
145 - httproot
146 - startdir
147 - hide_dot_files
148 - forbidden
149 - disable_commands
150
151 For overriding configuration values you need a special configuration file. The
152 path to this file is defined using the "userconf_file" configuration option in
153 the main configuration file (add the option if necessary). This file consists of
154 key-value-pairs and sections, marked by a string encapsulated in square brackets
155 (perhaps you know this format, it is nearly the same as the Windows INI files).
156 Each section in this file describes an individual configuration, whereby the
157 name of the section is the username for whom this configuration should be used.
158 Here is an example:
159
160 [homer]
161 fileroot = /var/www/homer/htdocs
162 httproot = /
163
164 This sets the physical file root directory to "/var/www/homer/htdocs" and the
165 virtual HTTP root to "/" - but only for the user whose HTTP authentication
166 username is "homer".
167
168 Using the "aliases" option, you may also define some other usernames for whom
169 this configuration should be used:
170
171 [homer]
172 fileroot = /var/www/homer/htdocs
173 httproot = /
174 aliases = marge bart
175
176 Using this, the users whose usernames are "marge" and "bart" use the same
177 configuration as "homer". You can place an arbitrary number of usernames
178 seperated by whitespaces here.
179 Note: If one of the users mentioned as an alias and an individual configuration
180 section for this user exists too, the one mentioned as an alias is ignored.
181
182 If there are some files marked as inaccessible using the "forbidden"
183 configuration option in the main configuration file, but some users should have
184 access to these files, you may clear the default value of "forbidden":
185
186 [homer]
187 fileroot = /var/www/homer/htdocs
188 httproot = /
189 forbidden =
190
191 Using this, "homer" has access to all files in "/var/www/homer/htdocs".
192
193 Notes
194 -----
195
196 Symbolic links are treated as files, no matter where they point to. The user is
197 just allowed to see the path where the link points to, he is allowed to delete
198 the link, to rename it and to overwrite it by renaming an other file. Nothing
199 else is allowed.
200 Accessing a symbolic link pointing to a directory also caused a very strange
201 effect: It was possible to access this directory, but you could not access the
202 objects in it.
203 I had to do it in this way because of the very stupid behaviour of abs_path()
204 from the Cwd module: This function is just able to detect the absolute path of
205 directories.
206 Hard links are not affected by this.
207
208 ------------------------------------------------
209
210 (C) 1999-2000 Roland Bluethgen, Frank Schoenmann
211 (C) 2003-2011 Patrick Canterino
212
213 E-Mail: patrick@patshaping.de
214 WWW: http://devedit.sourceforge.net/

patrick-canterino.de