Terminal Icon

Understanding UNIX permissions

Since Mac OS X is built on a UNIX core, you can set permissions by entering UNIX commands in Terminal.

Each file or directory has three types of security groups:

Each security group is assigned a code that controls that group’s permissions:

To view permissions for files and directories in Terminal, type the ls -l command. For each file or directory listed, you see the permissions, owner and group name, and file or directory name.

Examples:

The following file (-) displays read, write, and executable permissions for owner (rwx), group (rwx) and all others (rwx): -rwxrwxrwx

The following file (-) displays read, write, and executable permissions for owner (rwx), and group (rwx), but no permissions for others (---): -rwxrwx---

The following file (-) displays read, write, and executable permissions for owner (rwx), but no permissions for group (---) or others (---): -rwx------

The following file (-) displays read and write, but no executable permissions for owner (rw-), group (rw-), and others (rw-): -rw-rw-rw-

The following file (-) displays read, write, and executable permissions for owner (rwx), but only read and executable for group (r-x) and others (r-x): -rwxr-xr-x

The following file (-) displays read, write, and executable permissions for owner (rwx), but only read for group (r--) and others (r--): -rwxr--r--

For more information on permissions in UNIX, refer to the man page by entering: man ls

See also

UNIX

Open this for me

man page for ls