09-19-2018
Webserver and cgi run with root user.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
AAAHHH!! I've made a perl program that you can run on a web browser. This program needs to be run everyday, and I don't want to have to run it everyday. The problem is when I try running the program from my terminal, all it does is print stuff to the terminal page (the program involves a lot of... (4 Replies)
Discussion started by: sstevens
4 Replies
2. Shell Programming and Scripting
I wrote a script to automate user account verification against peoplesoft. Now I want to make it available to my peers via the web. It is running on Solaris.
I have the form written, but am not sure how to make it work. I think the form should call a perl cgi when submitted. The cgi should call... (7 Replies)
Discussion started by: 98_1LE
7 Replies
3. Shell Programming and Scripting
Hey - I am new to cgi scripting... just writing a script to output df -k output to html page... but I cannot get the df lines on separate lines on the page, it all comes out on one line and is not very readable.. any suggestions?
My script is below - please keep in mind I am only new to it so... (1 Reply)
Discussion started by: frustrated1
1 Replies
4. Shell Programming and Scripting
Hi,
I'm learning some simple cgi scripting. I can make a script like this,
so my browser shows "Hello World"
/www/cgi-bin/name.sh
---
#!/bin/sh
MyName=World
echo "<html> Hello $MyName </html>"
---
What I'd like is to have a separate html and script files in the cgi folder so ... (1 Reply)
Discussion started by: Performer
1 Replies
5. Shell Programming and Scripting
Hi guys,
got a problem with a perl cgi script over here. I need it to run a system command to get the status of a process. Unfortunately the process is owned by a specific user and only this user can get its status. So i tried running the command from the perl cgi with "su", but then i get the... (12 Replies)
Discussion started by: polki
12 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
This is a problem I am having with my 2 semester senior project. I have a LAMP server running Ubuntu 9.10 with... (8 Replies)
Discussion started by: JMooney5115
8 Replies
7. UNIX and Linux Applications
hi there
im currently in the process of creating a website for use basically within our org. im using a os x machine and installed MAMP - which includes Apache, mysql... the site will be used by techs to primarily install pkgs files onto os x devices. i would like to have buttons or hyperlinks... (2 Replies)
Discussion started by: sheshe
2 Replies
8. Shell Programming and Scripting
I am having trouble with bash. I am trying to put a command in an if statement and then compare it to a string.
This works perfectly.
echo $(ipcs | grep Shared | awk '{print $2}')When I put it in an if statement I get some problems.
$ if ; then echo expression evaluated... (10 Replies)
Discussion started by: cokedude
10 Replies
9. Shell Programming and Scripting
How to run several bash commands put in bash command line without needing and requiring a script file.
Because I'm actually a windows guy and new here so for illustration is sort of :
$ bash "echo ${PATH} & echo have a nice day!"
will do output, for example:... (4 Replies)
Discussion started by: abdulbadii
4 Replies
10. UNIX for Beginners Questions & Answers
Hello,
I want to run this script on my CentOS 6 via browser :
________________________________________________________________________________________________
#!/bin/sh
echo Username?
read MY_NAME
echo Provisional file name?
read MY_FILE
echo File NAME you want to save?
read MY_FILE2... (16 Replies)
Discussion started by: juta2020
16 Replies
LEARN ABOUT DEBIAN
pod::webserver
Pod::Webserver(3pm) User Contributed Perl Documentation Pod::Webserver(3pm)
NAME
Pod::Webserver -- minimal web server to serve local Perl documentation
SYNOPSIS
% podwebserver
You can now point your browser at http://localhost:8020/
DESCRIPTION
This module can be run as an application that works as a minimal web server to serve local Perl documentation. It's like perldoc except it
works through your browser.
Run podwebserver -h for a list of runtime options.
SECURITY (AND @INC)
Pod::Webserver is not what you'd call a gaping security hole -- after all, all it does and could possibly do is serve HTML versions of
anything you could get by typing "perldoc SomeModuleName". Pod::Webserver won't serve files at arbitrary paths or anything.
But do consider whether you're revealing anything by basically showing off what versions of modules you've got installed; and also consider
whether you could be revealing any proprietary or in-house module documentation.
And also consider that this exposes the documentation of modules (i.e., any Perl files that at all look like modules) in your @INC dirs --
and your @INC probably contains "."! If your current working directory could contain modules whose Pod you don't want anyone to see, then
you could do two things: The cheap and easy way is to just chdir to an uninteresting directory:
mkdir ~/.empty; cd ~/.empty; podwebserver
The more careful approach is to run podwebserver under perl in -T (taint) mode (as explained in perlsec), and to explicitly specify what
extra directories you want in @INC, like so:
perl -T -Isomepath -Imaybesomeotherpath -S podwebserver
You can also use the -I trick (that's a capital "igh", not a lowercase "ell") to add dirs to @INC even if you're not using -T. For
example:
perl -I/that/thar/Module-Stuff-0.12/lib -S podwebserver
An alternate approach is to use your shell's environment-setting commands to alter PERL5LIB or PERLLIB before starting podwebserver.
These -T and -I switches are explained in perlrun. But I'll note in passing that you'll likely need to do this to get your PERLLIB
environment variable to be in @INC...
perl -T -I$PERLLIB -S podwebserver
(Or replacing that with PERL5LIB, if that's what you use.)
ON INDEXING '.' IN @INC
Pod::Webserver uses the module Pod::Simple::Search to build the index page you see at http://yourservername:8020/ (or whatever port you
choose instead of 8020). That module's indexer has one notable DWIM feature: it reads over @INC, except that it skips the "." in @INC. But
you can work around this by expressing the current directory in some other way than as just the single literal period -- either as some
more roundabout way, like so:
perl -I./. -S podwebserver
Or by just expressing the current directory absolutely:
perl -I`pwd` -S podwebserver
Note that even when "." isn't indexed, the Pod in files under it are still accessible -- just as if you'd typed "perldoc whatever" and got
the Pod in ./whatever.pl
SEE ALSO
This module is implemented using many CPAN modules, including: Pod::Simple::HTMLBatch Pod::Simple::HTML Pod::Simple::Search Pod::Simple
See also Pod::Perldoc and <http://search.cpan.org/>
COPYRIGHT AND DISCLAIMERS
Copyright (c) 2004-2006 Sean M. Burke. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.
AUTHOR
Original author: Sean M. Burke "sburke@cpan.org"
Maintained by: Allison Randal "allison@perl.org"
perl v5.10.0 2008-01-09 Pod::Webserver(3pm)