How to Run the .sh File Shell Script In CentOS/RHEL

I have created a shell script with the extension .sh on my linux CentOS server. This script will be scheduled using crontab. Before start to run the crontab for that script, there is important step that we must follow. Otherwise all the created script will not running. We have to set an executable permission for the created script using the chmod command. In unix/linux environment, chmod purpose is to change access permissions for any files or folders.

To change the executable permission on my script called is as below:

    chmod +x


    chmod 0755

Note : Allow execute permission to everyone explanation as below

    User (rwx) = 4+2+1 = 7
    Group(rx) = 4+1 = 5
    World (rx) = 4+1 = 5
    chmode mode = 0755 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>