Quote:
Originally Posted by LXer
Published at LXer:
If you are a Linux user, or a webmaster managing your own website (which is probably hosted on a Linux server), you will surely come across a situation when you try to upload a file or modify a document and receive the error “You do not have the permissions to upload file to the folder“. And after some googling, the solution is often as easy as setting the file permission to “775? or “777?. So what exactly does “777? mean? And why must it be ’7?, and not ’8? or ’9??
Read More...
|
Why '7' ? ... because the numbers are base-8 or octal and thus have values 0-7.
Numeric permissions are in fact a four-digit octal number.
The command
man chmod reveals the following:
Code:
A numeric mode is from one to four octal digits (0-7), derived by adding up the
bits with values 4, 2, and 1. Omitted digits are assumed to be leading zeros.
The first digit selects the set user ID (4) and set group ID (2) and restricted
deletion or sticky (1) attributes. The second digit selects permissions for the
user who owns the file: read (4), write (2), and execute (1); the third selects
permissions for other users in the file's group, with the same values; and the
fourth for other users not in the file's group, with the same values.
For some time, most of use avoid the numerics and rely on the symbolics (r)ead, (w)rite,
e(x)ecute. This is also explained in the man page.
I hope this helps,
~~~ *<;-}( )// Dan