drwxr-xr-x 2 File permission
i have 2 types of files. well i have the same file type with permission.
and i was wondering if any one could tell me how to properly read them permission type 1 = "-rw-r--r-- 1" permission type 2 = "drwxr-xr-x 2" Thanks. |
i was reading http://www.redhat.com/docs/manuals/l...ownership.html
and it looks like that 1 and 2 are not part of the permission but i don't know what it stands for |
Quote:
"rw-" means the file's owner can read from and write to the file "r--" means members of the file's group can read from the file "r--" means other users can read from the file "1" means the file has 1 hard link Quote:
"rwx" means the directory's owner can list its contents, create new files within it, and descend into it "r-x" means members of the directory's group can list its contents and descend into it "r-x" means other users can list the directory's contents and descend into it "2" means the directory has 2 hard links That's the way I understand it. If any of the above is provably wrong then please do correct me. |
just to further elaborate on telengard's post for educational purposes...
another way to read it can be defined below; r = 4 w = 2 x = 1 divide the permission in to 3 different groups (User, Group, Everyone Else) So just to give a clear example, a common permission is 755 which means (User has complete control of the file, Groups can read and execute without modification, Everyone else can read and execute without modification.) |
All times are GMT -5. The time now is 03:21 PM. |