Cannot execute a shell script though permissions are set correctly
We just migrated our servers from RHEL 7 to RHEL 8. Now the shell scripts that were working fine under RHEL 7 by being called directly from the command prompt are not working on RHEL 8. The permissions on the script files are set properly.
Example:
$ ~/scripts$ ll yy.sh
-rwxr-xr-x. 1 oracle dba 20 May 31 08:32 yy.sh
$ ~/scripts$ ./yy.sh
-bash: ./yy.sh: Permission denied
$ ~/scripts$ cat yy.sh
echo testing script
When I put bash in front of the scripts it works. But on the RHEL 7 server I did not need to put bash in front of the scripts:
$ ~/scripts$ bash ./yy.sh
testing script