I have created user, e.g.
ronly, now I want to give them read only access to few directories on other user home like
abc/,xyz/,pqr/ so I put this
ronly user in others means not created any group for this user that means
ronly will be others for above directories.Now everything work as per expectation but the only issue is that
abc/,xyz,pqr/ have some shell scripts that
ronly should read but NOT execute them.
The shell scripts having permission like this
-rwxrw-r-- test.sh means user
ronly can see the scripts but should not execute them, this work for only one way like executing shell scripts like
./test.sh this gives
permission denied but with
sh test.sh and
/bin/sh test.sh can allow
ronly to execute the scripts.
So is there any way by which I restrict them to execute shell scripts files?
Please do not suggest ACL or SElinux. I do not want to enable this due to some restrictions.