Sorry for my so many questions :S, so as root created this simple script which once executed shows a "Hello World" message. The thing is I want no one except root has executable permission over that script but I want OTHERS can enter the directory which holds the script itself, so:
Code: Select all
[root@Centos7]-[test]$ chmod 700 test1
[root@Centos7]-[test]$ cd ..
[root@Centos7]-[data]$ chmod 700 test/
[root@Centos7]-[test]$ ls -l
drwx------. 2 root root 19 Apr 21 15:22 test
[root@Centos7]-[test]$ chmod -R o+rX test/
[root@Centos7]-[test]$ ls -l
drwx---r-x. 2 root root 19 Apr 21 15:22 test
[root@Centos7]-[test]$ su lisa
[lisa@Centos7]-[data]$ cd test/
[lisa@Centos7]-[test]$ ls -l
-rwx---r-x. 2 root root 32 Apr 21 15:22 test1
[lisa@Centos7]-[test]$ ./test1
Hello World!!
[lisa@Centos7]-[test]$
Once again, thank you!!!
edit: I forgot to mention that I get the same results with setfacl -R -m o:rX test/
User finally can execute the script as well!