Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read/Execute permission to Group

Status
Not open for further replies.

KarthikBabu

Programmer
Jul 17, 2001
18
0
0
IN

I have a shell script that needs "execute only" permission to group and others for security reasons. I have defined the permission code of the script as 711 (owner rwx, group execute, others execute). But the members of the group are unable to run the script, the script just hangs. When i change the permissions to 751, the members of the group are able to execute the script successfully.

So, is it true that the file cannot be executed by an user unless he/she has read permission on it ? If so, how can i secure my file so that my group members have permissions just to execute the file and not read it.

I am working on Tru64 V4.0F running on a Compaq Dec Alpha box.

Any help will be highly appreciated. Thanks.
 
Your problem is mostly because it is a shell
script. The setuid bit on shell scripts doesn't apply,
only the setuid bit on executeables. This is because the
shell script is read and interpreted. New processes are
created for each line in the shell script

This is also why you are having problems with the read bit for group.

Can you make the program into an executeable?
 
Thanks. Yeah, i can change my shell script into a C executable and use the setuid bit. Thanks for your help, deehowe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top