Executing a script as another user but retain owner permissions
Posted on 2001-07-11
I have a background application script/program, moveit.exe say, that modifies files in a directory. It runs constantly but can be stopped and restarted.
At the moment, the program is owned by the user, fred say, and so are the directories and files.
What I would like to do is create application operators that do NOT have access to those directories and files but is still able to start/stop the background application, which would modify/move the said files.
I tried using the 'sticky bit' (chmod g+s moveit.exe) but this did not produce the desired effect - when running moveit.exe as jill who is in the same group as fred, the script is executed as jill which fails because jill does not have permissions on the directories and files the script manipulates...
Is there a way I can do this on my Sun Solaris 8 UNIX box?