Friends will come back in this list and we're going to talk about file folder permissions in the next
in our previous list and we'll learn how to create and manage groups.
So in this lesson we're going to talk about the file folder permissions file folder permissions allows
us to secure our file folder again or try to use the Rexus.
OK.
There are basically three permissions that can set for a file or folder that is read write and execute.
OK.
Before moving file permissions we need to know the file types.
OK.
So let's see the file types are available inside the Linux environment.
The first type is the regular fights Regel files means that could be a text file or any image file or
in the Final Exit could well file.
OK all these files are comes under the category of regular files and these are denoted by this hyphen
symbol then the directory files all the directories that are present in the links are calderas the directory
files they're treated as files and they are now read by the symbol D.
And the third type of file is a special file so.
They are having their special purposes.
So let's see those special files here.
The first kind is the block file the block files are the hardware files and which are located inside
the directory OK we're going to see it later.
How that looks.
But for now just understand block files are the hardware files and denoted by the symbol B.
Then the next file sarcastic to do X Files.
And these are denoted by symbol C and like a standard input output stream they are work like input output
stream.
Then the next category is by face.
These are denoted by symbol B.
And these are also called as the FIFO.
That is first in first out.
OK.
The next step is symbolic links or symbolic files and these are denoted by the symbol.
OK.
In windows we can create a shot good for any file.
Ok so the symbolic links are work like that.
And these are denoted by symbolical.
OK.
The next and the last type of file is socket files.
And these are denoted by symbol s and these files are used by these applications to communicate with
each other.
OK so these are the basic file types which are present in the Linux environment.
OK.
So let's see.
Practically now how to view these types and also how to apply different kinds of access permissions
to the file folders.
Well first of all let's understand the file types here.
So let's get inside there and here.
Yes.
OK.
Now here you can see at the beginning shows us see the inner hard at some file shows the.
OK.
Let's try it again.
OK.
Here you can see at the beginning of some file it shows B and then.
OK.
All these beginning characters didn't mind the file.
Ok whether it is a directory or a block file or symbolically.
OK.
So with this come on we can see the file type here and the next three options here determine the permissions
and the permissions are categorized in three types that this user group and other users.
OK let's understand this here.
The first three here little minds read and write access for user.
OK.
The first three it reminds the user access means so what kind of permissions.
The user is having for this fine then the next tree determines the group what kind of permissions the
group is having for these files.
So this file is currently having a read write permissions for the group and also for the owner or the
user.
OK.
And the next are the last three that are wise to all the user permissions means what other users could
do with this file.
OK.
So these permissions here are read and write.
So in this way these permissions are set here in the Linux environment so they can serve this permission
in the same manner.
OK.
Here with the help of see more come on.
So let's get to the home directory here.
Let's get the here.
There are two files.
So first of all let's remove these files.
Came in directly and you got the key.
OK.
Let's create a new file.
STUDENT.
Yes.
Now do the permissions.
OK.
It is Harry Reid the writer for owner or the user then for a group it is having read write and for other
users it is having only read access.
So how to change the permissions.
So with the permission there are two methods to change or set the permissions for a file or folder.
The first one is alphabetic order.
You can call it.
It takes permission and the next one is numeric mid-tone.
So let's see how to apply different permissions here.
That text Rogel textual Stylistics still way.
So you know there is a common quality more it's used more you can search different permissions for a
file or folder.
So suppose I want to set the permissions for the user so to stype you then the permission you need to
add a symbol.
And suppose I want to add only what I want to add or read write promotion.
R stands for W4 right and x4 execute and then the file name the file name is still student be XTi.
Now let's do.
Sorry Alice.
And here you can see we set the permissions for the user that is read write and execute.
And for a group there is only a read and write permission.
So suppose I want to set the same permission for group and then just replace this youth with G.
Now is permissions applied to the group.
So let's view.
And now here you can see the read write and execute permissions applied to the group.
And suppose I want to pare it to other users means the user which are not belonging to the group ok.
Or it is not the owner of the file.
Then for those kinds of user I want to add the simple machine that is read write and execute and then
simply replace this it all or stands for other uses.
And hit enter and see here again.
Now here you can see user group and other users all are having the read write execute permission for
this file.
I get in this way you can set the permissions for a file with prophecy is more common and what you do
if you want to remove the permissions from a file.
So just replace this symbol.
When this enter and let's see the result.
OK here you can see all the permissions are removed for the other users.
Suppose I want to insert only read the permissions.
Now just read on.
And here you can see other uses and having only the permissions in this way you can set the permissions.
OK you can add all the permission at that time or remove all the permissions for a file.
OK at the same time with the technique like this you all OK and just minus and then right x.
I want to remove right and exclude permissions from all that is user group and other people or other
users then simply hit enter and no let's view helis.
And here you can see I've removed the right and executive permissions for user group and other users
and here only reader permission is allowed for all the users.
And in the same way you can add this permission at the same time that is with the help of this combination
the Yuji hopeless in the blue that is only read and write.
Now let's view.
OK.
Now here again the user group and other users are having the read write permission.
So in this way you can set or remove the permissions for a file.
Ok this is the alphabetic or textual way to add the permissions.
OK under Linux.
So the next way I would like to show you is the numeric way.
So in the normal form for really permission there is a value collarless for an For write permission.
Number two is used and for secured permission.
Number one is user.
So if you want to had real permissions for all get the permission Neki for all that is user group and
other users you can simply use food for food.
OK.
And hit enter.
Now let's view.
OK.
Now here you can see the root permission is applied to all these user groups and other users.
And suppose we want to add a read and write permission.
So what do you need to do is you need to fall in to do get out of 4 and 2 and then four plus two is
six.
So six now read and write permissions that apply to the user id enter Gil sorry again not read write
permissions are applied to the user.
And if you want to add all the permissions to the user then you need to add the exact permission means
one to this six that is seven.
OK.
So dental.
And now read write execute permissions are applied to the user here.
OK.
Or the owner.
So in this way you can't simply do this mathematical combination or numeric combination and you can
apply the permissions to the file.
Suppose I want to apply these permissions to all that user group and or do then I can simply add this
convention here 7 7 7.
OK.
Now let's do the research.
And here you can see for all that is user group and other users all the permissions are applied.
OK.
So in this way you can set the permissions for a file or folder inside the Linux environment.
OK.
There are some switches.
OK.
You can use here.
Go see it's more common I suppose.
There is a directory and subdirectory and you want to like the result could then.
In which case you can use the switch Ifan are OK.
And if you want to apply the result OK to each file inside a directory then in that case you can use
her fancy.
And if there are some error messages.
Is this command is showing then in that case you can use Hi-Point have to block that error messages
in the output.
There is also a technique to apply if you said 0 0 0 ok then all the permissions are removed.
Here from this file.
So if you are trying to read it let's look at student Lochley XTi.
OK.
It says permission is denied.
You need to be sudo access or administrator Google these file contents.
So now after removing here all the permissions if you want to add the permission to user group and to
other users then you can simply go like this.
école who are the X this will add a read write an executive permissions all OK.
So don't tell us.
And here you can see all the permissions applied.
So in this way you can manage or set up the permissions file or folder and you can block an authorized
user access.
OK.
With the help of these permissions.