Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ID problem with cgi-scripts

Posted on 1997-08-11
3
Medium Priority
?
151 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
The viewer will learn how to count occurrences of each item in an array.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

636 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