Work with Permissions
Everything you do on your Mac, and especially on the command line, is governed by permissions—which user(s) can do which things with which items, under which circumstances. In this chapter, I introduce you to file permissions, along with the closely related notions of owners and groups. I also explain how to temporarily assume the power of the root user using the sudo
command.
Understand Permission Basics
As you may recall from See What’s Here, when you list files in the long format (ls -l
), you can see the permissions, owner, and group of each file and directory. Every file in macOS has all these attributes, and you should understand how they work because they influence what you can and can’t do with each item.
Before ...
Get Take Control of the Mac Command Line with Terminal, 3rd Edition 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.