Re: Setuid function does not work in Linux ?!

From: Average Joe (joe_at_pong.tunestar.net)
Date: 02/19/04

  • Next message: Seth: "Re: Dish 501 DVR file system type?"
    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


  • Next message: Seth: "Re: Dish 501 DVR file system type?"

    Relevant Pages

    • Re: [SLE] pppd not setuid root
      ... > but i remember having to setuid as ... > Every time SuSEconfig is run it'll take off the suid bit. ... sent on Linux ...
      (SuSE)
    • Re: [SLE] Partition Magic vs. Linux partitioner
      ... drive is multiboot it only boots it is a LINUX system only ... and was created as a LINUX system. ... 2.the Windows partition is larger than about 8 GB (more ...
      (SuSE)
    • Re: ELF loading
      ... Is there anything like ActiveX on a Linux system, ... a data source and can convert from one data source to another transparently? ...
      (alt.lang.asm)
    • Re: How to cancel printing or to delete a print job that is stuck
      ... printer that is on the linux system? ... Jobs get a reference count associated with them from the spooler and the ...
      (microsoft.public.windowsxp.print_fax)
    • Re: how to produce cross-platform exe file?
      ... In linux system, I can launch the app by this commmand: ... I can launch the app by this command: ... I want to make a exe file, so that by double clicking the exe file, ...
      (Debian-User)