CS 134

Key Points: High-Level Filesystem

  1. 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
  2. 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
  3. 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

  1. 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)
  2. 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
  3. 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.)