Access permissions apply both to folders and to files. For instance,
your public_html folder should have a numerical access value of 755.
What does that mean, exactly? OK...there are three types of users that can potentially
access your files. You are one of them. You are the "owner".
Groups of people, such as your classmates, can have special access
privileges...they are called "group". And
last...there is a user group called "other".
These could be people trying to view your webpages from their home
Each user group is a ssigned a numerical access value. Let's
take, for example, a numerical access value of 755 (for your public_html
folder above). The number 7 corresponds to the "owner" (i.e.
you). The next 5 corresponds to "group".
And the last 5 corresponds to "others". Get
that? Owner(7)/group(5)/other(5)=755 (in
this case). So what do the numbers represent?
Each number is a sum of other numbers which correspond to individual types
of access. Take a look at the following table for an explanation.
|Write and execute
|Read and execute
|Read and write
|Read, write, & execute
"Read" means that any user group with
that permission can view the file or the contents
of the folder. "Write" means that they
can modify the file or the folder...you should be careful when granting write permission. "Execute" means
that they can run any program contained within a particular folder
or within any particular file.
So, for the value of 755 the owner had a numerical
permission value of 7 because he/she has "read", "write",
and "execute" permission (and because 4
+ 2 + 1=7). Make sense? What's the value for "group" and "other"?
They both have a numerical permission value of 5 because
they have "read", not 'write",
but do have "execute" permissions ( and
because 4 + 1=5).
In the SSH Transfer Client window (in the remote view) you
can view your permissions for each individual file and folder. In the
toolbar...change the display type of the remote view to "Details" by
clicking that button. In this view, you can see the permissions corresponding
to each file/folder on the right side of the remote window. See the
following screenshot for an example.
OK...yes...it's obvious that there aren't numerical values
in the right column where the permissions are displayed...but there
is a rhyme to the reason. If you view details for the public_html folder
in this example it should make sense. Much
like the individual numbers that make up the numerical value 755,
the permissions detail as shown here can be divided up by the three
user types owner, group, and other (other
is sometimes refered to as "world"). The "d" at
the beginning of the string simply stands for directory (or
what many people call folders...the two are interchangeable). In the
case of files...the absence of the "d"
means that it's a file.
So what's this rwx stuff? Well, it's quite simple actually. r=read, w=write, x=execute. We
already saw what numerical value each permission had...the long string (e.g.
for public_html) is drwxr-xr-x. A dash (i.e
the absence of any permission be it r, w,
or x) means that the user group does not have that particular
permission. In this case, neither group nor other has write permission.
Take the three-column metaphor one step further and it all should come together.
Bringing it all together is the next table of corresponding values.