Tutorials Homepage

Tutorial 3 | Changing permissions

3.1 What are file permissions

The purpose of this lesson is to introduce how you can control access to your files. The files in your Unix account are yours to use as you wish (for the most part, the Unix system administrator truly "owns" them.) You might want to make sure that someone out exploring the Unix file system doesn't visit your home directory and look at your files' contents. Or perhaps, you are working with others and want to share your files. The way to control who gets to see what in your directories is where permissions come in.

Whether you are aware or not, the default setting is (usually) that your files are readable by anyone (except your email files- the email programs are smart enough to 'know' that you probably don't want your email to be 'world readable').

Some answers to some typical questions...

Typically, all files default to being strictly non-executable. This makes it difficult for viruses to corrupt your system. Each file has a permissions field which is 10 letters long. The permissions field looks something like this: drwxrwxrwx or -rw-rw----, you get the idea. The first space contains either d if it's a directory, or a dash if it's a file. What do those letters mean? Letters two, three and four represent the permissions that the user (ie you) have. r means the file is read permitted, w is write permitted, and x is executable. Letters five six and seven represent the permissions that the group ( type ls -l file_name the name in the second column is the group name.) If the group name is your user name, then the permissions for your user name over-ride the group setting. Letters eight to ten represent the permissions that some one accessing from any location has.

 

 

 

 

 

Go previous page                next page Go

go to page:
|1|2|3|4|5|6|7|8|
getting started


files and directories


changing permissionsGo



editors

























Take quiz

take quiz 3 >>