O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

File Permissions

Because of OS X’s Unix heritage, it has a multi-user permission model on the file system.

Users and groups

Every user on the system has an integer user ID. Each user belongs to one or more named groups, and each group has an ID. For instance:

$​ ​l​s​ ​-​l​ ​c​h​a​p​t​e​r​.​t​x​t​
-​r​w​-​r​-​-​r​-​-​ ​ ​1​ ​m​a​r​k​d​ ​ ​s​t​a​f​f​ ​ ​4​8​8​2​7​ ​A​u​g​ ​1​1​ ​1​4​:​1​4​ ​c​h​a​p​t​e​r​.​t​x​t​

The user is markd, the group is staff.

$​ ​l​s​ ​-​l​ ​/​b​i​n​/​l​s​
-​r​-​x​r​-​x​r​-​x​ ​ ​1​ ​r​o​o​t​ ​ ​w​h​e​e​l​ ​ ​8​0​6​8​8​ ​F​e​b​ ​1​1​ ​ ​2​0​1​0​ ​/​b​i​n​/​l​s​*​

ls is owned by the user root, the group wheel.

You can see what users and groups are configured on your machine with the Directory Services tools dscl and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required