Solved

ID problem with cgi-scripts

Posted on 1997-08-11
3
139 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now