?
Solved

ID problem with cgi-scripts

Posted on 1997-08-11
3
Medium Priority
?
152 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

755 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