WP Digi Clock Plugin - Folder and file permissions

Date: 11th January 2008 at 2:27 am | Filed under: development, plugins, wordpress | Author: Sam Burdge

I have recently received emails from a couple of users of my WP Digi Clock Plugin who have been unable to update the clock's settings via the Digi Clock options page in WordPress. Unfortunately I do not have time to give individual support for my free plugins as I am too busy building sites, earning a living etc. However, I think the reason some of you have been having trouble is due to file/folder permissions on your server. When you update the clock's options the wp-clock-params.php file for the clock is updated (this file stores your clock settings), if the permissions for the file, and the digi-clock folder itself are not set correctly it will not be able to update.

The permissions should be set as follows:

wp-digi-clock (folder) – 755
wp-clock-params.php (file) – 644

Here is a brief explanation of file and folder permissions on a unix server:

The three user types are:

  1. user - the user (the owner of the file or directory), who you are on the system is determined by username and password at login time
  2. group - a group of users, e.g.: administrators, plain users, etc.
  3. world - anyone else, e.g: anonymous users or anyone who is not the owner, or of the same group as the owner, of the file or directory

The three access types are:

  1. read - the file or directory can be read
  2. write - the file or directory can be written to, or deleted
  3. execute - the file (scripts or executables) can be run, or the directory can be entered

To set permissions, in the simplest form, you use a three digit code: the first digit represents the access given to the user, the second digit represents the access given to the group, the third digit represents the access given to the world. The values that make up each access type are:

4 = read
2 = write
1 = execute

To apply more than one type of access to a user type, simply add the values together to get access permissions of the desired types:

7 = read, write & execute (4 + 2 + 1)
6 = read & write (4 + 2)
5 = read & execute (4 + 1)
4 = read
3 = write & execute (2 + 1)
2 = write
1 = execute

Putting together these digits determines the 3-digit permission code that makes up the file's permissions.
E.g. User: read, write & execute (7) + Group: read & execute (5) + World: read & execute (5) = 755.

Leave a Comment