OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

Executable Permissions

The next thing we have to do is make our script executable. This is easily done using

chmod:


[me@linuxbox ~]$ ls -l hello_world

-rw-r--r-- 1 me me 63 2009-03-07 10:10 hello_world [me@linuxbox ~]$ chmod 755 hello_world

[me@linuxbox ~]$ ls -l hello_world

-rwxr-xr-x 1 me me 63 2009-03-07 10:10 hello_world

[me@linuxbox ~]$ ls -l hello_world

-rw-r--r-- 1 me me 63 2009-03-07 10:10 hello_world [me@linuxbox ~]$ chmod 755 hello_world

[me@linuxbox ~]$ ls -l hello_world

-rwxr-xr-x 1 me me 63 2009-03-07 10:10 hello_world


There are two common permission settings for scripts; 755 for scripts that everyone can execute, and 700 for scripts that only the owner can execute. Note that scripts must be readable in order to be executed.


Top OS Cloud Computing at OnWorks: