Executing Shell Script in Linux and file permissions


First lets execute shell script, later we will talk about execution permissitions

my file is   file.sh   which is on Desktop of current user

Open your terminal

If your current directory is not Desktop

check it by trying this command


this prints current working directory

Now type

chmod 744 file.sh

if this is not working then try

sudo chmod 744 file.sh

what is this 744?

this is the file permission

7                              :         4                              :         4

1   1    1                   :      1  0 0                         :  1 0 0

R W E                        R  W E                          R  W  E

Owner of file    : Group  of Owner :  Other

R:  Read  Permission

W Write Permission

E : Execute Permission

You can set this permission as per your need and wish.

this has included for the sake of file security.

Read more about file permissions here


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s