Back at my Unix command prompt, I try typing the name of the script to run it:
hello.plxhello.plx: Permission denied.
Hmm. Welcome to the world of
permissions. This is one of the trickier parts of making
the transition to Unix. If you’re an impatient person, just
type the following command:
chmod 700 hello.plx
and go on to the next topic. If you want to know what’s really going on, though, (which I strongly recommend, since it will save you much trouble later), keep reading.
In Unix, you can have three different types of permissions with
respect to a particular file: read permission, write permission, and
permission lets you read the file (you need me to tell
write permission lets you make
changes to the file, and
execute permission, in
the case of a script or program, lets you actually run it.
So, that’s the first half of the permissions story. The second
half is this: the three types of permission can be set to
“on” or “off” for each of three different
sets of people: the file’s
owner (you, in
the case of the scripts you’ve created), members of the
group (which we’re going to
ignore for now), and
everyone else in the world
(which we’re also going to ignore for now).
Check the permissions on a file by entering
filename being replaced by the name of the
file. To look at the permissions on my
ls -l hello.plx