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,034 times
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,673