4-Browsing Folders and Intro to File Permissions
- ls
- ls
- show the content of the current directory
- ls /filepath
- show the content of the specified directory
- ls -l
- detailed list
- Columns:
- File Permissions
- Links to a file
- Owner
- Group
- # of Bytes
- Modified Date
- File Name
- ls -lh
- show the # of bytes in Human readable format
- #b=bytes
- #k=kilobytes
- #m=megabytes
- #g=gigabytes
- UNIX File Permissions
- 3 Levels of Permissions
- 1. User Level
- Each file only has 1 owner
- 2. Group Level
- Each file has only 1 group
- 3. Everyone Else
- 3 Types of Permissions
- 1. Read Access
- 2. Write Access
- 3. Execute Access
- 10 or 11 character string
- -rwxrwxrwx
- 1st Character
- - = file
- d = directory/folder
- l = symbolic link/alias
- other characters possible, but rare
- next 9
- Seen in groups of 3
- First 3: User Permissions
- Next 3: Group Permissions
- Final 3: Everyone Permissions
- If the permission is given, the letter applying to that
permission is shown
- if not, then a -
- example: drwxrw-r--
- Read and Write access are self explanatory
- execute:
- for a file: run/execute that file
- for a directory: list the contents of the
directory
- When you access a file, UNIX checks to see who you are, and
what groups you belong to, and compares it to the file
- If you are the owner, it applies the owner permissions
- drwx------
- If not, it checks if you belong to the group which owns
the file, if so, it applies group permissions
- d---rwx---
- If not, the everyone else permissions are applied
- d------rwx
- Final Character
- Not always there
- 2 Possibilities
- +
- extended security permissions
- rare, mostly on system files
- @
- extended attributes
- more common
- color, icon, spotlight comments, etc
- Bart Busschots
- bartb.ie
- impodcast.tv
- podfeet.com