I am running a shell script(Script.sh) which, itself, is calling other shell scripts( Script2.sh, Script3.sh ...etc). I logged in as a root user and have given execution permission to all the scripts. But on when I execute "ls -l" the scripts still dont have execution permissions displayed on file attributes column. "Script.sh" runs by following syntax:
root@freescale $ sh Script.sh But this script is not able to execute other scripts(Script2.sh, Script3.sh) being called by it. Error is reported as "Permission denied"
I already gave execution permission by chmod command but then also neither the permissions are changing nor the scripts(Script2.sh, Script3.sh ..) are executing.
I hope this error is due to the reason that Script2.sh are called in Script3.sh as:
./Script2.sh ./Script3.sh And if I write it as : sh Script2.sh It executes but doesn't able to execute other script which are called inside Script2.sh and reports same error as "Permission Denied"
chmodcommand you used? You need to set the execute bit on the scripts.ls -l Script*?root@freescale$ sh Script.sh