I am running a script but there is an unusual warning:
This is what happened in my console
#whoami
root
#ls -l test.sh
-rwxr-xr-x. 1 root root 1894 Feb 2 01:58 test.sh*
#./test.sh
-bash: ./test.sh: Permission denied
Edit:
my script:
#!/bin/bash
while read pass port user ip file; do
echo "startt------------------------------------" $ip
ping $ip -c 4
if [ $? -eq 0 ]; then
echo $ip ok...
else
echo $ip failed...
fi
echo "finish------------------------------------" $ip
done <<____HERE
pass 22 root 1.1.1.1 test.txt
____HERE
any idea?
thank you
Best Answer
im guessing it has do with SELINUX. You are able to check the status with simply typing
sestatus