|
|
|
|
| Private Perl modules in CGI scripts on Hermes/Hercules |
|
Problem: Since users don't have direct access to Hercules, our primary web server, Perl modules written by the user can not be accessed by Apache directly. This is an inconvenience, but it also means untrusted code can't be executed on the web server without the administrator's consent.
This article describes the steps that must be taken by the administrator in order for such modules to be installed in a way that allows further modification by the user.
|
|
Solution: 1. Think of a unique, descriptive "modulegroup" name for the module or collection of modules. A project name of some sort is usually a good idea. The user will refer to his files as "modulegroup::filename". Make sure you talk to the user and agree over this name.
2. Create a directory in his/her home directory, with user/group ownership that permits the user to create/edit files as needed, and allows the group read/execute permissions. Don't forget to set privilege flags "g+s" and "+x" on the directory.
3. Create the same group on Hercules, and grant user "nobody" membership of that group.
4. Create a directory symlink on Hercules:
"cd /usr/lib/perl5/site_perl/5.6.0/"
"ln -s modulegroup /home/httpd/html/user/username/directory"
5. Create a directory symlink on Hermes:
"cd /usr/lib/perl5/site_perl/5.005/"
"ln -s modulegroup /home/httpd/html/user/username/directory"
|
|
|
|
|
|
This is free technical advice without any warranties.
Use at your own risk. Solutions offered may not apply to your particular problem at all.
Opinions and views expressed in the articles are the authors' personal
and may not necessarily reflect or coincide with those of Ano-Tech Computers.
We take no responsibility if anything bad happens from following any of
the intructions given. If you don't understand and accept this, please
contact us for personal assistance instead.
To read our full disclaimer, go
here.
We welcome anyone who is willing to contribute to this public knowledge base,
contact siteadmin@atc.no
if you have information you would like to share. The idea is not to replace
the commercial support sites, but to publish those hard-to-find
solutions you've found yourself looking for over and over again.
Show all articles