Key Points: High-Level Filesystem
Directories and Links
- Directory Structure:
- Directories map filenames to file IDs
- Directories are themselves files in the filesystem
- Root directory typically has a known file ID
- Directory hierarchies allow organization into trees
- Hard Links:
- Multiple directory entries can point to same file ID
- System maintains reference counts
- File only deleted when last reference removed
- Usually not allowed for directories
- Symbolic Links:
- Special files containing paths to other files
- Can point to files anywhere in filesystem
- Don't prevent target file from being deleted
- Continue to work when target file is replaced
- Often a fixed limit on how long a chain of symbolic links can be
- Can have security implications
- Can point to nonexistent files
File Permissions
- Unix Model:
- Each file has owner and group
- Three permission sets: owner, group, others
- Basic permissions: read, write, execute
- Unix culture: Permissions often represented in octal (e.g., 644, 755)
- Access Control Lists (ACLs):
- More flexible than basic Unix permissions
- Can specify permissions for multiple users/groups
- Support more granular access controls
- Often apply hierarchically
- Role-Based Access:
- Defines roles with sets of permissions
- Users can have multiple roles
- Simplifies permission management
- Common in enterprise environments
Remember
- Directories are just special files mapping names to file IDs
- Hard links and symbolic links serve different purposes
- Basic Unix permissions balance simplicity and security
- More complex permission schemes exist for enterprise needs
- Security considerations are crucial in filesystem design
- Metadata management extends beyond just file contents
(When logged in, completion status appears here.)