Your File Permissions

Let’s take a closer look at the first column. As we said on the previous page, the first letter tells you whether you’re dealing with a regular file or a directory. The next letters tell the system what access is permitted for this file; hence the name “permissions.”

In the listing below, we’ve eliminated some columns and added spaces to the permissions column to make it easier to read.

- rwx r-xr-x  joe  acctg  archive.sh 
- rw- rw-r--  joe  acctg  orgchart.gif
- rw- rw-r--  joe  acctg  personnel.txt
- rw- r--r--  joe  acctg  publicity.html
d rwx rwxr-x  joe  acctg  sales
- rw- r-----  joe  acctg  topsecret.inf
- rwx r-xr-x  joe  acctg  wordmatic

The first set three letters after the file type tell what you, the owner of the file, have permission to do.

An r in the first position means you are permitted to read the file. A w in the second position means you may write the file. This includes the ability to delete a file. An x in the third position means you may execute the file.

A hyphen in any position means that you don’t have that particular permission.

As you can see above, joe, the user who owns the file, can read and write all the files. He can execute the shell script archive.sh and the program wordmatic.

But what’s the x doing on the sales directory? When a directory has the x set, this takes the special meaning of “permitted to search this directory”.

<< Introduction Index Group Permissions >>