Im creating a script file and I want to add the permission via chmod -R 777 myApp/*
I add to the script the following line
cd /home/abc/aa_tmp chmod -R 777 myApp/*
you can use this;
#!/bin/bash chmod -R 777 /home/abc/aa_tmp/myApp/*
if the user has enough privileges above script works. But if permissions is as below, throw permission denied
user@host:/tmp/$ ls -arlt .. d--------- 2 user user 4096 Aug 25 16:38 myApp ..