Understanding file and directory permissions
The last section of this chapter deals with a very important concept that we haven't touched on so far. Permissions in Linux are handled very differently than those on the Windows platform, but Mac users may already understand these concepts as they are very similar.
While using the Linux shell, you may have noticed funny characters next to file names. For example, when entering ls -l
into the shell while in a directory that contains files, you may see the following output:
drwxr-xr-x 2 jdoe users 4096 Dec 24 14:10 Documents drwxr-xr-x 4 bsmith users 4096 Dec 31 13:54 Movies drwxr-xr-x 11 root root 4096 Dec 24 14:11 Private
Before diving into permissions, let's explore the output of the ls -l
command so that you understand each section. The first section contains the permission string for each file or folder. We'll get into this shortly. Next to the permission string, you'll see a number. This number contains the link count...