Chapter 3. Using the Filesystem Securely

WHAT'S IN THIS CHAPTER?

  • Filesystem permissions and access controls

  • Encrypted filesystems

  • Networked filesystems

  • Layout of a Mac OS X filesystem

  • Quarantining downloaded files

  • How to ensure a "deleted" file really is deleted

The default filesystem used by Mac OS X and the iPhone OS, HFS+, has a venerable history. HFS+ is derived from the classic Mac OS's HFS filesystem, which was introduced in 1989 and itself borrowed concepts from Apple's earlier Lisa computer. It also includes a multiple-user permissions system based on the UNIX filesystem, access control lists based on the Windows model, and extended attributes borrowed from BeOS. In addition, Mac OS X supports numerous other filesystem types, including networked filesystems. In this chapter you'll find out about the security concerns relevant to working with files and filesystems.

UNIX PERMISSIONS

The simplest form of access control provided by the Mac OS X and iPhone filesystems is the UNIX permissions model. This model builds on the concepts of users and groups introduced in Chapter 2. Every file and folder has a single owner, which corresponds to one of the user accounts on the computer. Each file also belongs to a single user group. The permissions stored for each file record the access available to three classes of user — the file's owner, members of the owning user group, and everybody else (the catch-all).

There are three permission bits that can be set for each of the three user classes: read, ...

Get Professional Cocoa® Application Security now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.