A permissions primerIf you (Web design templates) find yourself scratching your
A permissions primerIf you find yourself scratching your head when looking at parts of that longformat file listing, don t worry. The Comprehending file types section, laterin this chapter, gives you a feeling for the first letter on each line, but ninemore characters are attached to that item before you get to the next column. This group of nine is the set of permissions(also called a permission set) forthe file or directory. Linux, Unix, and even Mac OS X use permissions as away of providing file and directory security by giving you the means to spec- ify exactly who can look at your files, who can change them, and even whocan run your programs. You need this capability when you have a bunch ofdifferent users on the same machine, networked to the world. Checking out the triadsEach permission set consists of three triads. Each of the triads has the samebasic structure but controls a different aspect of who can use what. Considerthe long format listing for /home/deein the following code: total 20drwx—— 2 dee dee 4096 Jul 29 07:48 . drwxr-xr-x 5 root root 4096 Jul 27 11:57 .. -rw-r–r– 1 dee dee 24 Jul 27 06:50 .bash_logout-rw-r–r– 1 dee dee 230 Jul 27 06:50 .bash_profile-rw-r–r– 1 dee dee 124 Jul 27 06:50 .bashrc-rw-rw-r– 1 dee dee 0 Jul 29 07:48 lsfileThe first character in the permission set refers to the type of file. For a direc- tory, the character is shown as a d, as you see here for the first two items inthe preceding list; files are designated with a dash (-) instead. Each file ordirectory s permission set is a group of nine characters that is, the ninecharacters that follow the first character (for a total of ten). But this group ofnine is really three groups of three, as shown in Figure 10-12. RWERWERWUsersGroupsOthersELegend: R=ReadW=WriteE=ExecuteFigure 10-12: Breakdownof the ninepermissioncharacters. 211Chapter 10: Manipulating Files and Directories16_