Linux file permissions appear to be cryptic, but they're straight forward. "775" has an immediately intuitive meaning, if you are aware of two things:
1. Each number represents the permission for the file owner, for the group owner, and for everyone else.
2. The number represents the permission for that owner.
The permission number is arrived at by assigning a numeric value to each allowed permission:
4 = read (r)
2 = write (w)
1 = execute (x)
0 = no permission (-)
In the case of a file with permission 751, it can be deciphered to mean:
The owner of the file has permission 7, which is read (4) + write (2) + execute (1).
The group owner has permission 5, which is read (4) + execute (1).
Everyone else has permission 1, which is execute (1);
No comments:
Post a Comment