One of my script is making new .sh files in /tmp/ folder how can I setup that all new files in /tmp/ folder will get chmod -x automaticaly because my script is failing when trying to run scripts in /tmp/
Asked
Active
Viewed 1,019 times
1
-
http://askubuntu.com/q/311438/80864 – choroba Nov 07 '14 at 10:26
-
2possible duplicate of How do I make an entire directory executable? – αғsнιη Nov 07 '14 at 17:56
1 Answers
2
Wrong approach. While creating the script, set the x flag as well! Or, when executing the created script, prepend sh
or bash
to it:
Instead of:
/tmp/myscript.sh
use:
bash /tmp/myscript.sh
Like that you don't have to make the script executable.

Frantique
- 8,493
-
What if I can't edit that file? it's very complicated script involving both .sh and .php – John Nov 07 '14 at 11:16
-