Problem solved!
]]>Having a strange behaviour from my shell scripts on btrfs file systems.
any time I try to execute script with a command "sh" in front the script, it is working.
Issuing command with ./script.sh it is not and I get Permission denied.
Example:
Script1:
#!/usr/bin/env bash
echo test
echo test
sh test2.sh
./test2.sh
Script2:
#!/usr/bin/env bash
echo test2
echo test2
output
[root@xxx test]# ./test.sh
-bash: ./test.sh: Permission denied
[root@xxx test]# sh test.sh
test
test
test2
test2
test.sh: line 6: ./test2.sh: Permission denied
[root@xxx test]# ls -la
kokku 8
drwxr-xr-x 1 root root 30 13. märts 23:51 .
drwxr-xr-x 1 nobody nobody 178 13. märts 23:43 ..
-rwxr-xr-x 1 root root 43 13. märts 23:51 test2.sh
-rwxr-xr-x 1 root root 64 13. märts 23:51 test.sh
[root@xxx test]#
Scripts work fine when placed on xfs filesystem.
[root@xxx test]# ./test.sh
test
test
test2
test2
test2
test2
[root@xxx test]# ls -la
kokku 12
drwxr-xr-x 2 root root 37 13. märts 23:56 .
drwxr-x--- 17 root root 4096 13. märts 23:56 ..
-rwxr-xr-x 1 root root 43 13. märts 23:56 test2.sh
-rwxr-xr-x 1 root root 64 13. märts 23:56 test.sh
[root@xxx test]# pwd
/root/test