Solved

ID problem with cgi-scripts

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can I modify this Excel worksheet with a script? 15 91
Need help Creating PowerShell Script 4 46
Powershell Split 18 29
Help to debug powershell script 5 44
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 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 …
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

726 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