When ever user want to execute a shell script he should have execute permissions on that, then only he will execute without any issue. Most of the people will give permissions to them(for user bit alone) alone when changing permissions. This is right way to do it and it will avoid others not to execute his scripts. But some times it's required to give full permissions(executable permissions) to a script if it should run for any user in the script.
Below is the command to set full permission to a script so that any in that machine can execute the script.
chmod a+x scriptname
chmod ugo+x scriptname
chmod +x scriptname
Once the permissions are set, any user can execute the script by using below commands.
Latest posts by Surendra Anne (see all)
- FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018
- wget download a file to a directory in Linux/Unix - June 4, 2018
- GIT: How to compare two GIT branches? - June 3, 2018