The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



Thread: setuid
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-15-2002
sanjay92
Guest
 

Posts: n/a
Question setuid

I have a C wrapper programme which basically execute a shell script. The shell script has 700 as permission and oracle is owner of the shell script.
The C execuatble has 4711 permission so that means that it has setuid bit set and group and others can execute the C executable.
The reason why I am doing is, I don't want to give read access to my shell script to others and group and owner will have rw access to the script file.

When I execute my C execuatble as different user, it works great but I want some enhancement. When my script is being executed, it is executed as oracle user so every line in the script is executed as oracle user but there are certain things which I want to run as the real user not the effective user. e.g. my shell script calls sqlplus , so when sqlplus is being run , it is run under oracle user but what I want is , it should run under the name of real user.
Is there any easy way to do this ?

Thanks
Sanjay
Remove advertisements
!!
!! Forum Sponsor