Troubleshooting Permissions

Trouble shooting permissions problems can be tricky. Start by checking the existing file permissions:

Unix files have permissions indicated by a code which looks like this:

 drwxrwxrwx 
|{ }{ }{ } d{user}{group}{others}

The d indicates that the file is a directory. If it is not, there will be a - (dash) in its place;
The next three letters indicate permissions of the owner (user): read, write, and execute;
The next three indicate the permissions of the group (this is only important for files made accessible to a selected group);
The last three indicate the permissions of all others.
For public directories, the execute permission must be set for everyone.
For public files, the read permission must be set for everyone.

Permissions can be set using "absolute" numerical codes or "symbolic" letter codes. The command chmod (change mode) is used to set and change permissions.

In the numerical code, the first number sets the user permission, the second sets group, and the third sets others. Read permission is 4, write permission is 2, and execute permission is 1; these values are added, so that 4+2+1=7; 4+2+0=6. A code of 711 then means that the user has rwx permissions, and group and other have execute permission only. A code of 644 means that the user has rw permission, and group and other have read permission only.

In the letter codes, u is user (owner), g is group, o is other, and a is all (u, g, and o). Plus and minus signs are used to add or remove permissions, which are indicated by r (read), w (write), and x (execute). So a command of chmod a+r would add (+) read permissions to all.

To check and/or change the permissions,

You can also check permissions using the SSH File Transfer client.

To check the public_html perrmissions

To check individual file permissions

 

The next most common problem is Error 404: File Not Found.

 


Dean Taciuch
GMU English Department

Valid XHTML 1.0Valid CSS!

Creative Commons License
This work is licensed under a Creative Commons License.