From Joomla! Documentation
Revision as of 15:26, 19 October 2012 by Tom Hutchison
This article or section is incomplete, which means it may be lacking information. You are welcome to assist in its completion by editing it as well. If this article or section
- Depending on the security configuration of your Web server the recommended default permissions is:
- 755 for directories
- 644 for files
- Don't use extensions that require 777 permissions!
Learning the numbers
Each digit corresponds to a group of three letters each digit also corresponds to one set of permissions as follows:
- First digit = owner,
- second digit = group,
- third digit = others (everyone else),
Note: On some servers you may not see the numbers as shown above, what you see is rwxrwxrwx (777) or something similar.
Meaning of the numbers
It is much easier to say the "octal" sum of a file or directory has 755 permissions than to call out the permissions:
The permission # is a three-digit octal number where the three digits correspond to the access rights of the user who owns the file, the group and other users. Each octal digit is the sum of the permissions granted. To make it easy to understand, just remember:
r = Read = 4 w = Write = 2 x = Execute = 1
If read permission is granted the "octal" number is 4. Add 2 to 4 for a 6 if write permission is granted along with read permission. Then you can finally add 1 if execute permission is granted along with the Read and Write permission. If there are no permission at all, the sum is 0. Just do the Octal Math:
|"Octal" #||(r)ead||(w)rite||e(x)ecute||User or Group or Others|
Now it is time to put it all together. User, Group, Others(Everyone or the World) into a 3 digit "octal" permission.
- 777 means EVERYONE can read, write and execute ANY file.
This something you NEVER want to be allowed on your server/website unless you are absolutely sure you know what you are doing.
- 755 is rwx (owner), r-x (group) and r-x (others) or in other words everyone may read and execute (run) but only the owner(you) may make changes to the file. It would look like this when it is all put together:
- 644 is rw-, r--, r-- or EVERYONE can read the file but only the owner may write to the file.
- Permissions can be applied to directories as well which is why you might see this
drwxrwxrwx, the "d" is for directory.
- For a complete explanation read the Wikipedia article: Filesystem permissions