Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
on ocaml and set-user-id programs
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-03-27 (10:31)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] on ocaml and set-user-id programs
On Sun, Mar 27, 2005 at 12:01:45PM +0200, Stefano Zacchiroli wrote:
> I've wrote an ocaml program that needs to be executed set-user-id root.
> I managed to have it being executed with effective user id 0 only
> compiling in native code or in custom bytecode. Both executing it as a
> script using "ocamlrun ocaml" and compiling it to non-custom bytecode
> make the program having effective user id of the user executing it.
> (Example session at the end of this mail)

I think the problem is simply caused because your kernel has setuid
scripts disabled, for security reasons.  According to the second
reference below, Linux ignores the setuid and setgid bits on scripts.


Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology -
Team Notepad - intranets and extranets for business -