Back to Technical Support

What Are CGI Permissions


The following is a simple explanation of file permissions in Unix. To list the access permissions of a file or directory, SSH to your server, then cd directoryname to change the directory until you are either in the directory above the file you are interested in or above the directory you are checking. If you enter the ls -l filename, you will see what the current permission settings are for that file along with other information about the file.

Using chmod

PeoplePermissions
u = the file's user (you)r = read access
g = the file's groupw = write access
o = othersx = execute access
a = the user, the group, and others

 In our VPS environment, there are only two users: root (our system administrators), and you. This means that you are the only user in the 'group' category. Additionally, there isn't anybody who has access to your VPS that falls in the 'other' (also commonly referred to as 'world') category. You won't need to consider the 'other' category when setting the permissions of your files and folders.

To change permissions for a file named filename.cgi, you need to chmod the file (change mode). For example, when you type chmod u=rwx,g=rx,o=rx filename.CGI, you've given:

  • read, write, and execute access to the user (that's you)
  • read and execute access to the group
  • read and execute access to others

For example, some scripts will tell you to chmod 755. Doing the above is the same thing as typing chmod 755. You can use either method with our Unix servers. So when you use the numeric system, the code for permissions is r = 4 w = 2 x = 1 rwx = 7. The first 7 of our chmod 755 tells Unix to change the user's permissions to rxw (because r=4 + w=2 + x=1 adds up to 7). The first 5 applies to the group, and the last 5, refers to others (4+1=5).

When doing an ls -l on the file, SSH always shows the permissions as -rwxr-xr-x. Ignore the first dash, then break up the above into three groups of letters. If there's a dash where a letter should be, it means that there is no permission for those people. Remember, the first 3 apply to the user, the second 3 apply to the group, and the third 3 apply to others.

Changing Permissions with FileZilla

  1. Highlight the file you wish to change the permissions on by left-clicking it once.
  2. Right-click the highlighted file.
  3. Click File Attributes... from the menu.
  4. You can now click the ReadWrite, and Execute boxes for the OwnerGroup, and Public sections of the Change File Attributes dialogue box.
  5. Alternatively, you can also set a numeric permission value in the Numeric value box (i.e. 755).
  6. Click OK to save your settings.

Changing Permissions with SmartFTP

  1. Highlight the file you wish to change the permissions on by left-clicking it once.
  2. Right-click the highlighted file.
  3. Click Properties / CHMOD from the menu.
  4. You can now click the ReadWrite, and Execute boxes for the UserGroup, and Others sections of the Properties dialogue box.
  5. Alternatively, you can also set a numeric permission value in the Permissions box (i.e. 755).
  6. Click OK to save your settings.

Changing Permissions with Fetch

  1. Highlight the file you wish to change the permissions on by clicking it once.
  2. Under the Remote menu, select Change Permissions.
  3. You can now click on the ReadWrite, and Execute boxes to change permissions as needed.
  4. Click OK to save your settings.

Related Articles

How To Backup Your Website In WordPress
How To Clean Your Site In WordPress
How To Configure Miva Store Utility
How To Find Your Site Manager Account's IP Address
How To Install CGI Software

Can’t Find what you need?

No worries, Our experts are here to help.