Hello, everyone.
In this lesson, I'm going to talk about the file ownership and permission.
So as we can see here in the graph, so the first digit here represents the type of the file and we
have the D, the D is the directory.
If we have the dash, this is represent a txt file.
But in our example here we have the d which is the directory.
Then the next three digits we have the owner permission.
So we have the read and write and execute and the next three digits we have the group permission, we
only have the read or write, we don't have an execute permission.
The third one we have for the other, we have the read and execute permissions, but we don't have the
write permission.
So number two, here we have the number of the links and Tom is the owner of this directory.
And Linux is the the group or is the owner group of this directory.
And here is the size of the directory and here is the date that we created this directory and this is
the name of the directory.
So they are there are many different types of files in Linux.
So as we explained in the previous example, we have the D, which is the directory and dash, which
is the text file, and we have here the device file and block and so on.
So here is really important also to know about the symbolic link represented by L.
So in Linux we have permission sets and those permission sets we they represent each file or each directory
that we create in the system.
So, for example, here, the permission says that we have we have the read and write and execute.
So the read represents or the sign of the character with R and the right, we have the W and execute,
we have the X and the value WI is very important to know about the value of each of these permissions.
So for example, the R and the permission value is a number for a right.
And the value of the permission of the permission.
Right.
It's to and execute.
Here we have the value number one.
So if we don't have any permission or like anything that on the file.
So it represent by the dash and the value is zero.
See here.
Here's an example.
We have number four.
As we explained in the previous example, we have the read permission and we have the two for the write
permission and X, which is execute.
We have the value.
It's one.
And if there is no permission, this is zero.
Is very important to know about the difference when we assign the permission sets either to a directory
or a file.
If we want to access.
A directory and this directory has a read permission.
We can view a list the content of the directory when we run the command ls.
If we want to access a file and we have the read permission, we can copy the file and view the content
of the file.
If we have the right permission.
If you would like to access a directory, we can modify or rename, create and remove the directory
content for the file, we can modify the content of the file.
If we have an execute permission for accessing the file, we can run CD command in order to access the
directory.
If we have an execute permission to access the file, we can execute a random file, for example a shell
or bash script.
In order to run file, we need we need both a read permission.
And execute permission.
This is for the bash and script files.
So as we said that before, if there is no permission or there is no deny, so we represent Y with the
dash.
Thus concludes our session.
Thank you and see you in the next lesson.