File System Security

  • File System Security refers to the mechanisms and practices used to protect the data stored in a file system from unauthorised access, corruption, or loss

  • It ensures the confidentiality, integrity, and availability of files and directories

  • File system security is a critical aspect of operating system security and involves a combination of technical controls, permissions, and policies

File Permissions

Linux

  • Permission bits are grouped in three triples – define read, write, and execute access for owner, group, and other

  • A ‘-’ indicates that a right is not granted

Example

A permission string like rwxr-xr-- means

  • The owner has read, write, and execute permissions (rwx)

  • The group has read and execute permissions (r-x)

  • Others have only read permissions (r--)

Ownership

  • Each file and directory is owned by a specific user and group

  • The owner has control over the file's permissions

Permission Types

  • Read (r) - allows viewing or reading the file/directory

  • Write (w) - allows modifying or deleting the file/directory

  • Execute (x) - allows running the file as a program or accessing the directory

Permission Levels

  • User (Owner) - permissions for the file owner

  • Group - permissions for members of the file's group

  • Others - permissions for all other users

File Integrity Checking

We can use tools like Tripwire or AIDE to monitor files for unauthorized changes by comparing current file states with a known baseline

Examples in Different OSs

Linux/Unix

  • Uses permissions (e.g., chmod, chown) and ACLs for access control

  • Tools like SELinux or AppArmor provide additional security policies

Windows

  • Uses NTFS permissions and ACLs

  • Features like BitLocker provide encryption for file systems

macOS

Uses APFS (Apple File System) with built-in encryption and permissions