Red Hat Bugzilla – Bug 114864
Users in "Others" group can not able to execute scripts unless they have read permissions.
Last modified: 2007-11-30 17:06:53 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Description of problem:
If I give users in "Others" group and only give them execute
permissions, they are not able to execute the scripts. I've to give
read permissions on the file in order to execute that script.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Write a small script. say echo "Hi " in script.
2.chmod 751 to that script.
3. Login as a user who is not a owner and not in that group also. and
execute the script.
Actual Results: It gives result permission denied for that script
for that user.
Expected Results: He should be able to execute the scripts as he
have execute permission.
ls -ld test
-rwxr-x--x 1 root root 24 Feb 3 11:42 test
./test: ./test: Permission denied
for that user.
We can execute same thing in other OS like Sun, HPUX. with same
To execute a shell script the users shell has to be able to read it.
When I called support for this, they asked me to open a bug for
this. Also I can do similar things on other OS where I can give only
execute permissions for a script and not a read permission.
On Linux, this is simply the way things are --- the shell needs read
access to the file it is running. It's possible to imagine ways for
the OS to bypass that requirement but given that this is
security-sensitive semantics, Red Hat will always follow the accepted
Linux behaviour here.