473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

setuid and current paths

hi again,

Im clearly a moron, and have solved the problem myself, due to a wish
to avoid dire embarrasment I shall not reveal the stupid mistake I made ;-)

Apologies for the inconvenience
Dave
hi all,

Im using the setuid-prog.c script to setuid my cgi script.
The C script is chowned to "myuser" (not root, I dont need root access
just the access myuser has).

However when I do this, the path it executes the script from is not
the same dir as the cgi itself.

My CGI script uses a dir structure within its own dir, but when
I execute it from another dir (via the setuid script) Im not
in that dir natively.

Ive tried chdir without success, and chroot runs me into a permissions
problem.

Anyone want to tell me how I _should_ be doing this ?


Jul 18 '05 #1
0 1484

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ben Eisenberg | last post by:
I'm trying to run a php script setuid. I've tried POSIX_setuid but you have to be root to run this. The files are located on a public access unix system and have me as the owner and nobody as the...
1
by: Domenico Andreoli | last post by:
Hi, I did a little research about execution of Python setuid scripts. I found only a couple of C wrappers I don't like. So I wrote my own, it is available at . Feel free to send comments. 2c...
3
by: Michele Simionato | last post by:
I have a script that sometimes is run by myself (user id 501) and sometimes by the mailer program as nobody/nogroup (userid 65534). I would like to change the effective uid to 501 in any case, to...
3
by: pasear | last post by:
I find I can't run setuid perl script when I do this on a Unix-like platform: 1.Create a file "setuid.pl": #!/usr/bin/perl -T 2.chmod a+x setuid.pl 3.chmod u+s setuid.pl then i try
1
by: vertigo | last post by:
Hello i need to read $PATH variable for all users. I wanted to use something like setuid() and getenv() in C. Are there similar functions here ? (if not how can i do it ?) Thanx Michal
1
by: vimala | last post by:
Hi, I have to write a setuid program which is going to check for accesslogs based on the real user who had invoked the executable. I need to get the real and effective user-ids of the system...
3
by: Tiago Simões Batista | last post by:
Hello all I have a situation that requires that a python script, that is run from a webpage (via php exec()) must be run with root privileges. The sysadmin already set the setuid bit on the...
0
by: 123jainmin | last post by:
When I ran a perl script named script.pl which have the the follwing line: system("echo hostname = $HOSTNAME > /tmp/myinfo"); I have another shell script script.ksh which simply call script.pl...
2
by: Stu | last post by:
Is there anyway to tell if a setuid() call has been made to some other user? If so, can somebody provide me with some sample code Thanks in advance to all that answer
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.