Jenny M Jenny M -4 years ago 98
Linux Question

Chmod for application via script

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/*

which doesnt work , when I try to update/edit file I got permission denied, any idea what I miss here?

Answer Source

you can use this;

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download