Re: Setuid function does not work in Linux ?!
From: Average Joe (joe_at_pong.tunestar.net)
Date: 02/19/04
- Previous message: Average Joe: "Re: Interested in Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 19 Feb 2004 21:53:01 GMT
On 2004-02-19, Daniel Pope <daniel-po@shaw.ca> wrote:
> I'm not new in Linux (nor as programmer) but I'm facing this problem:
> I (badly)neede to make a SUID C program BUT any time when I run the program
> the setuid (seteuid ent the similar) function does not work at all and I get
> the runtime message error code(errno=1):
> "OPERATION NOT PERMITTED".
> I asked my provider if some default security settings on my Linux system
> prevents it from working properly but he doesn't know.
> Any hint would be greatly appreciated.
> Thank you in advance!
Are you running the program as 'nobody' (or equivelant userID of 65535?)
Some systems will not allow you to setuid on that magic number. A way to
check is run it as another user and see if that does it. If so, you'll
probably need to tweak the web server and/or your userID for 'nobody'
to avoid that number.
(I had a similiar problem awhile back and couldn't figure it out, someone
from the perl crowd helped me.)
Jamie
- Previous message: Average Joe: "Re: Interested in Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|