Technical Support Frequently Asked Questions

This area under constant construction as new questions come up

If you don't see your question here, please send technical support feedback or questions using our on-line form and get your question answered directly.

FAQ's about Permissions

What are permissions ?
What are read, write and execute permissions ?
Displaying permissions
Reading permissions
Default permissions
Changing the permissions for a file or directory
Note for people with Web pages
Finding out the group for a file or directory
For more information


Q. What are permissions ?

A. Permissions give you the ability to make your files and directories accessible to other users. They also allow you to protect your files and directories from other users. The permissions on a file or directory govern what you the owner of the file or directory, as well as others who can access the system, may do with the file or directory.


Q. What are read, write and execute permissions ?

A. Read, write and execute permissions mean different things depending on whether the object in question is a file or directory.

For a file:

r = can read the file
w = can write to (change/edit) the file
x = can execute the file

Obviously, there is no reason to set execute permission for a non-executable file. Examples of non-executable files are image files (gif/jpeg) and text files. On the other hand, it is very important to properly set execute permissions for executable files, for example, programs and shell scripts.

r = can read contents of directory

Note: This does not mean permission to read files and sub-directories in the directory. Those permissions are set for the specific file or directory. "Read" permission on a directory just means someone can see a list of the files in the directory using the ls command.

w = can add files or directories to the directory, and can delete contents of directory, if the permissions on the individual files permit

x = can read or write to files within directory (if the individual files' permissions allow it), can search subdirectories, but cannot use ls command to list contents of directory.


Q. Displaying permissions ?

A. Use the ls (list) command with the -l (long) option to find out the permissions of a file or directory. For example, the user "jdoe" wants to see permissions on her home directory, so she:

  1. Opens her home directory (/home/users/j/jdoe) and
  2. Types "ls -l" and presses return.

She sees a list of files and directories that looks like this:

   drwx------  2 jdoe         4096 Oct 14 11:51 mail
   drwxr-sr-x  2 jdoe         4096 Oct  2 14:03 public_html
   -rw-------  1 jdoe         6332 Oct 10 17:47 meetingnotes


Q. Reading permissions ?

A.

Starting from the left

The first space is used to denote the type of object.

"-" is for a file
"d" is for a directory.

In the example from jdoe's directory, "meetingnotes" is a file in jdoe's home directory. "mail" and "public_html" are subdirectories in jdoe's home directory. Although there are several other object values, "-" and "d" are the ones you will most often encounter.

The next three characters control (r)ead, (w)rite, and e(x)ecute permissions for the file or directory owner (in this case, jdoe). For example, jdoe has read and write but not execute permissions for the file "meetingnotes".

The next three characters are the permissions for the group that the file belongs to. (See below for information on how to find out what the group is for a file or directory.)

For example the group does not have read, write or execute permission for jdoe's "mail" directory.

The group does have read permission for jdoe's "public_html" directory.

The "s" in the group execute permission for the directory public_html, is a little trickier. Basically, the presence of an "s" in this position means that the the group has execute permission.

The presence of a 'S' in this position would mean that the group did not have execute permission. (Why 's' and 'S' rather than 'x'? The answer is fairly technical and for the average user doesn't matter much. But, if you're interested please see the man (manual) pages on 'chmod'.)

The last three characters set the same permissions for others. Others have no access to the file "meetingnotes" or the directory "mail". Others do have read and execute permission for the directory "public_html".


Q. Default permissions ?

A. By default you will find your home directory is open to other users. (That is, they have read and execute but *not* write permission.) This is the default since many unix users wish to make files accessible to other users. If you want to share anything, you must have your home directory accessible.

Note: Your email is ALWAYS kept private by the system.

You can think of your home directory as an office. You (probably) want anybody to be able to come in, so you keep the door "unlocked". That is, you give the group and others read and execute permission.

However, you don't want others coming in and taking or adding things to your office. So, you do *not* give write permission to the group and others.

And as in any office you have things you wish to keep private. You put those in a separate "filing cabinet" (subdirectory) which you keep "locked". That is, you set the permissions so that only you have read, write and execute permission.

However, the choice of how to set the permissions for any of your files or directories is yours.


Q. Changing the permissions for a file or directory ?

A. As the owner of a file or directory you can choose how to set its permissions. You use the chmod command do so. For more information please see the chmod help file and the man (manual) pages on "chmod".


Q. Note for people with Web pages ?

A.

Note: If you have a Web page, the permissions for your public_html directory and any files within it which you want to be accessible via the Web must be set properly.

When we initially set up your account we created a public_html directory with the correct permissions (read and execute) for you. As long as you upload your web pages using an IP file transfer program such as Fetch or Ws_ftp, your uploaded pages will also have the correct permissions.

(Remember others must have read permissions in order to view ordinary text files.)


Q. Finding out the group for a file or directory ?

A. To find out what the group is use "ls -lg". For example, jdoe types:

ls -lg .history

and what she gets back is:

-rw-------  1 userx     users        1177 Oct 26 17:02 .history  
Thus, users is the group for the file .history.

All Access subscribers are in group "users". Thus, you can use group permissions to make you files and directories accessible to other Access subscribers.


Q. For more information ?

A. See the UNIX Utilities Page on the subject of permissions.