Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Problem running SUIDed script

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
tongro
Posts: 66
Joined: 2005-09-11 13:27
Location: Ireland

Problem running SUIDed script

#1 Post by tongro »

I have a Perl script that needs to be run with root privileges; it runs fine under sudo, but since I'd like to avoid using sudo, I set its SUID bit instead (it's owned by root). However now when I run the script (as an ordinary user), I get the error "Can't do setuid (cannot exec sperl)".

I did STFW, and got some results, but unfortunately nothing comprehensible. Can anyody tell me what I need to do? I'm running Debian Sarge.

Thanks a lot.


$world=~s/war/peace/g;

geoffb
Posts: 122
Joined: 2005-10-19 18:09
Location: Calgary, AB

Re: Problem running SUIDed script

#2 Post by geoffb »

tongro wrote:I have a Perl script that needs to be run with root privileges; it runs fine under sudo, but since I'd like to avoid using sudo, I set its SUID bit instead (it's owned by root). However now when I run the script (as an ordinary user), I get the error "Can't do setuid (cannot exec sperl)".

I did STFW, and got some results, but unfortunately nothing comprehensible. Can anyody tell me what I need to do? I'm running Debian Sarge.

Thanks a lot.


$world=~s/war/peace/g;
All the suggestions I came across tend to recommend a C wrapper. would that be possible?

http://db.csie.ncu.edu.tw/WWWClub/WWWse ... 5.html#Q50

tongro
Posts: 66
Joined: 2005-09-11 13:27
Location: Ireland

#3 Post by tongro »

Excellent, I'll try that, thanks.

It would be such a useful program that it's surprising there's not a standard utility to do the same sort of job. Or is there?

Thanks.

Post Reply