Solved

ID problem with cgi-scripts

Posted on 1997-08-11
3
141 Views
Last Modified: 2013-12-25
I am trying to execute a command in a CGI script. The httpd server runs as web,however. I need to execute the unix command with my name. I have tried running the script after 'chmod u+s xxx.cgi'; this doesn't work however.

Is there anything I can do short of giving web the right to execute the command or changing web to my name on the http server?

A solution would be much appreciated,
Cheers.
0
Comment
Question by:nimari
3 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1829620
What do you mean with: "I need to execute the unix command with my name"? What do you actually need to do?

A solution may come from a clear problem.

-julio
0
 
LVL 1

Accepted Solution

by:
gabsi earned 100 total points
ID: 1829621
You have to
1/ Start the httpd server with your login, so it inherits your environment
OR
2/ Servers allows to spcify the user ID in the configuration file.
OR
3/ encapsulate the cgi in a shell which makes
   su -c xxx.cgi USERNAME
0
 

Author Comment

by:nimari
ID: 1829622
I actually managed to execute the command by placing the following line in my perl cgi script, just before I wanted to execute the command -

$< = $>;


0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question