Let's examine the output from the ls –l command. For example, type the following:
>ls -l -rw-r--r-- 1 rob rob 2024 Dec 25 20:22 39 atest.tar -rwxrwxr-x 5 rob rob 1024 Dec 25 20:22 atest2.tar ...
When considering file and directories, you have to understand the concept of ownership. Ownership is nothing more than noting who owns the file. Each file has information stored with it that identifies the account that owns it. From the example of ls –l, you can see that I am the owner of the two files in my current directory: atest.tar and atest2.tar. Files are owned by those who create them, although ownership can be transferred.
Each file on the Unix system also has a secondary piece of information stored that records the group ownership of the file.
|
Permissions, once applied, will control what a user (or group) can do to a file or directory. There are three basic actions, which are self-explanatory: read, write, and execute. We have already spent time covering what executables are earlier in the book. If you do not have the permissions such as read, write, or execute, then you will not be able to work with the files. It's really that simple.
Read permissions control whether someone can view a file.
Write allows or disallows changes to be made to a file.
Execute permissions control whether a file can be run, or executed.
3.14.69.119