Operating System - HP-UX
1834149 Members
3848 Online
110064 Solutions
New Discussion

Why the user "oracle" can not start an executable file ?

 
SOLVED
Go to solution
May_3
Advisor

Why the user "oracle" can not start an executable file ?

Hi,

There is an executable file named "tts" and the file access permission is:
-r-sr-xr-- 1 root sys /home/jerry/tts
But I can not start it as "oracle". The output on the screen is:
sh: /home/jerry/tts : Execute permission denied
Can anybody tell me why and what the purpose of the command "chmod u+s"?
Thanks!
Best Regards.,
May
May
2 REPLIES 2
Patrick Wallek
Honored Contributor
Solution

Re: Why the user "oracle" can not start an executable file ?

The 'chmod u+s' set the set-uid bit to on for this file. Whenever it runs, no matter who starts it (assuming they have permission) it willrun as root.

If you want to run this as the oracle user you must do a 'chmod o+x /home/jerry/tts' in order to set world execute permission. The only problem with that is that ANYONE can then run the program and it will run as root.

If only oracle needs to run this, change the ownership to oracle 'chown oracle /home/jerry/tts'.

You probably also should do a 'chmod u-s /home/jerry/tts'
Wilfred Chau_1
Respected Contributor

Re: Why the user "oracle" can not start an executable file ?

if you want oracle to run it, chmod o+x /home/jerry/tts.

-r-sr-xr-- 1 root sys /home/jerry/tts
s is setuid, when it is executed, it runs as root. It was set via chmod 4000.