WebTools
view release on metacpan or search on metacpan
docs/INSTALL.html view on Meta::CPAN
You need also full access to '<font color="#FF0000">tmp</font>' directory
(your system directory or your own)</font></b></p>
<p><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Now let
see some examples:<br>
-------------------------------------------------------------------------------------------------
<br>
<font color="#FF0000">CASE 1:</font> You are some good user(july)
on some good free host(newald.proscriptum.com) :-)))<br>
Let 'july' user has home directory: <font color="#000099">/home/july</font>
(we use virtual host: july.newald.proscriptum.com)<br>
His full cgi-bin directory is: <font color="#000099">/home/july/public_html/cgi-bin</font><br>
So his webtools directory can be: <font color="#000099">/home/july/public_html/cgi-bin/webtools<br>
<font color="#000000">Now we can upload WebTools-1.27.tar.gz to our home
directory and after that to install script.<br>
After installation our process.cgi has permission mode set to 0755, directories
have permission modes: 0755 and any other files: 0444<br>
Features: <br>
- Our host is virtual, so Apache change user to 'july' when we start process.cgi!<br>
In other words we are ready to configure package whitout any hidden traps!<br>
Evrything is ok, so let run script: perl -c process.cgi<br>
<br>
-------------------------------------------------------------------------------------------------<br>
<font color="#FF0000">CASE 2:</font> You are some user (and
you has not virtual host) under Open BSD OS. <br>
User: <font color="#000099">snm</font><br>
Server: <font color="#000099">www.jozefina.bg</font><br>
User home directory: <font color="#000099">/home/snm</font><br>
His full cgi-bin directory: <font color="#000099">/home/snm/http/cgi-bin</font><br>
So his webtools directory can be: <font color="#000099">/home/snm/http/cgi-bin/webtools</font>
, <br>
please install package into this directory!<br>
Now let suppose that your scripts running with Apache's user (i.e. Apache
can't write into your directories when they has 755 permissions!). That
can be a problem, we realy need to write into <font color="#000099">db</font>,
<font color="#000099">logs</font>, <font color="#000099">mail </font>and
<font color="#000099">tmp</font> directories, so we must chmod these directories
to <font color="#FF0000">0777</font> (<font color="#FF6600">BUT THIS IS
UNSECURE</font>). To decide problem we must create these directories in
our home directory, for example:<br>
<font color="#000099">/home/snm/webtools/db</font><br>
<font color="#000099">/home/snm/webtools/logs</font><br>
<font color="#000099">/home/snm/webtools/mail</font><br>
<font color="#000099">/home/snm/webtools/tmp</font><br>
then we <font color="#339900">can chmod to 0777</font> these directories!
(other user can't read/write '<font color="#000099">snm</font>' directory,
so they can't access and these directories too :))<br>
After this you MUST move files from original(installed) directories to
directories we've just created (preserve attributes/permissions when files
are moved). Ok, is evrything done? Actualy not at all, you also need to
edit "config.pl". Please run 'pico' or some other editor and
change path to new location of <font color="#000066">db</font>, <font color="#000066">logs</font>,
<font color="#000099">mail</font> and <font color="#000099">tmp</font>
directories! </font></font></font><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">(or
use install.cgi to modify config.pl file!)</font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><font color="#000099"><font color="#000000"><br>
<br>
--------------------------------------------------------------------------------------------------<br>
<font color="#FF0000">CASE 3:</font> You have<font color="#FF0000">
root</font> access! Well is <font color="#FF0000">not a good idea</font>
to install webtools <font color="#FF0000">with root access</font>! You
can <font color="#006600">login with some other user</font> and install
package in directory you want and <font color="#006600">chown/chmod</font>
if need (using root). With root access you can install package on way
you want and can resolve problems very fast (if you want you can run your
scripts with '<font color="#006600">www</font>' user and so on...). You
can create directories (<font color="#000099">db,logs,mail, tmp</font>
...) into <font color="#006600">some private directory</font> (where nobady
except <font color="#006600">Apache can read/<font color="#FF0000">write</font></font>)...<br>
<font color="#FF6600">NOTE:</font> Please be very careful when install
any scripts/modules with root access. You bring responsibilty for your
actions!<br>
</font></font></font></b><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><font color="#000099"><font color="#000000">--------------------------------------------------------------------------------------------------</font></fon...
<p> </p>
<p><b><font size="2"><font color="#000099"><font color="#000000"><i><font size="4">SECURITY
SETTINGS:</font></i></font></font></font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><font color="#000099"><font color="#000000"><br>
</font></font></font></b></p>
<p><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Before
you can go life in web you have to check security settings of your web
server!<br>
Here we suppose that you haven't root access, so you can't make any changes
to server if any security fixes are required.<br>
<font color="#FF00FF"><br>
- First of all you have to check ability of externel user to access your
directories:</font><br>
(If you are owner of web server and you are the only one user on it e.i.
no body else can access remotely) you can close your eyes and leave this
check unperformed. Other else you have to check whether other user can
"cd" your directory. If that is possible you need to fix that
(contact your system administrator and ask him to protect your directory
of unauthorized access!)<br>
<br>
<font color="#FF00FF">- Secondry you need to check ability of web users
to access and/or read your datas and/or scripts:</font><br>
Immediatly go to your "webtools/htmls" directory and "vdir"(or
"ls -l") this direcory. It should contain file "env.html"
and it shoultd be with permission: <font color="#009900">644</font> (or
<font color="#009900">444</font>) depending of your OS defaults. <font color="#009900"><U>These
"htmls" actualy are embedded Perl files</U></font>, <font color="#BF3030"><U><font color="#990000">so
it is extreamly important these files (htmls) to be unaccessable and unreadable
from Web interface i.e. line like this: <font color="#0000FF">http://your_server/cgi-bin/webtools/htmls/env.html</font>
should return NOT html page, it MUST return "<font color="#FF0000">Internal
Server Error</font>" because Apache must interpret these files as
scripts!!!</font></U></font> If that is not true, you have to set other
extension for all files in webtools/htmls (<font color="#009900">.whtml</font>
, <font color="#009900">.cgihtml</font> , <font color="#009900">.htm</font>
or <font color="#009900">.cgi </font>are supported) That mean, that you
need to correct all files that access these ".html" files (and
given examples too). Other solution (when you have access to server) is
to forbid ".html" to be read in cgi-bin directory (you need
to edit httpd.conf -> please read Apache's documentation to learn how
to do that).<br>
NOTE: You can configure config.pl so extensions .whtml, .cgihtml and so
on to be treated as .html!!!<br>
<font color="#FF00FF"><br>
- Finnaly solution (and in many cases the best): </font><br>
You can install webtools into ../cgi-bin/webtools and after that you can
move all directories and files in your "secure" home directory
where no body except you can read/write these files! Ofcource you must
leave at least "<font color="#FF0000">process.cgi</font>" in
your web based cgi-bin/webtools directory and "<font color="#FF0000">conf</font>"
directory too, after these operations you <font color="#FF0000"><U>must
edit your config.pl file and mark changes of new webtools directory structure</U></font>
( run in 1.001 second using v1.01-cache-2.11-cpan-5511b514fd6 )