Perl - MultiUser Webserver Environment Help

L

lunardragoon

Hi,
I'm working on a self-planned project that basically has me
running a webserver from my home. I'm doing this project to gain some
"experience" with servers and multiple user environments that would
give me an idea of what I could face in my ventures outside of my
present highschool days. I felt that it was important to give you an
idea of what I was doing so you wouldnt feel like I was cheating on
something :p. Anywho...My problem is, I need to find a way to make the
Perl interpreter only allow listings of certain files and folders to
come up when a user's script interacts with the files and folders on
the server. The reason behind this is to keep the users from going
into folders of other users or potentially harming the operating system
that the server runs on.

My webserver environment comprises of Windows Server 2003,
Enterprise Edition (hey, free trial from Microsoft :p), the Xampp
package of the Apache 2 Server, and the latest build of ActiveState's
ActivePerl. Please note, I'm not using the mod_perl module for the
Apache webserver (mainly because I could not seem to run my scripts
correctly). For the Linux users,I absolutely can't switch to Linux for
this project, simply because this first part consists of me Learning
the Apache/'Windows way and another simple fact of me not knowing
anything when it comes to Linux :\. However, if theres a way to do it
in Linux, please say it as I could research around and look for a way
to implement it in a Windows environment.

I apreciate any help that I recieve on this issue, and I hope others
learn from it as well.

Thanks,
Travis Duncan
 
T

Tad McClellan

My problem is, I need to find a way to make the
Perl interpreter only allow listings of certain files and folders to
come up when a user's script interacts with the files and folders on
the server.


Your problem is: you need to find a way to make CGI programs
only allow listings of certain files and folders.

You do that the same way whether your write your CGI programs
in Perl or Python or Visual Basic.

ie. You do not have a Perl question here. You have a web
server configuration question.

I apreciate any help that I recieve on this issue,


Properly partitioning your problem goes an awful long way
toward debugging your problem.

You are looking in the wrong place.

Please post server configuration problems in a newsgroup
about web servers, such as:

comp.infosystems.www.servers.mac
comp.infosystems.www.servers.misc
comp.infosystems.www.servers.ms-windows
comp.infosystems.www.servers.unix

When you have a _Perl_ question, please post it here.
 
M

Michael Vilain

Tad McClellan said:
Your problem is: you need to find a way to make CGI programs
only allow listings of certain files and folders.

You do that the same way whether your write your CGI programs
in Perl or Python or Visual Basic.

ie. You do not have a Perl question here. You have a web
server configuration question.




Properly partitioning your problem goes an awful long way
toward debugging your problem.

You are looking in the wrong place.

Please post server configuration problems in a newsgroup
about web servers, such as:

comp.infosystems.www.servers.mac
comp.infosystems.www.servers.misc
comp.infosystems.www.servers.ms-windows
comp.infosystems.www.servers.unix

When you have a _Perl_ question, please post it here.

Well, I'll make it perl question. If you web server is running perl as
a module (aka mod_perl), there's no way to run as the owner of the
files. If you run as a CGI, you can use CGIwrap (google for it) on
Linux or MacOS to run CGI scripts as the owner of the file. Then it's a
matter of using the umask and filesystem permissions correctly.
 
T

Tad McClellan

Michael Vilain said:
Well, I'll make it perl question.


You haven't done that yet...

If you web server is running perl as
a module (aka mod_perl),


Since the OP said:

I'm not using the mod_perl module

I figure he probably is not using the mod_perl module.

If you run as a CGI, you can use CGIwrap (google for it) on
Linux or MacOS to run CGI scripts as the owner of the file. Then it's a
matter of using the umask and filesystem permissions correctly.


And how would that be different if the CGI program was written
in Python instead of Perl?

We still do not have a Perl question here.
 
A

Alan J. Flavell

And how would that be different if the CGI program was written
in Python instead of Perl?

We still do not have a Perl question here.

At risk of re-stating what's already obvious to you (but seemingly may
not be to the questioner) - the ability to partition a problem is (as
some think) *the* key to effective problem solving. The ability to
wheedle a one-off solution out of an off-topic newsgroup fades into
insignificance by comparison.

As such, the questioner is encouraged to work on their problem
partitioning skills for a life-long benefit, compared to any
five-minute fix they might get for the immediate question.

hth

--
 
L

lunardragoon

:\ My appologies. I thought that this may be a Perl centered problem,
but I guess not >.> Thanks for pointing me in the right direction ^.^
Sorry for the problem I caused in this group.

-Travis Duncan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top