WEBVTT

00:09.720 --> 00:15.010
Friends will come back in this list and we're going to talk about file folder permissions in the next

00:15.540 --> 00:19.660
in our previous list and we'll learn how to create and manage groups.

00:19.870 --> 00:26.170
So in this lesson we're going to talk about the file folder permissions file folder permissions allows

00:26.230 --> 00:31.530
us to secure our file folder again or try to use the Rexus.

00:31.540 --> 00:32.110
OK.

00:32.350 --> 00:39.980
There are basically three permissions that can set for a file or folder that is read write and execute.

00:40.000 --> 00:40.570
OK.

00:40.930 --> 00:41.190
OK.

00:41.200 --> 00:45.060
Before moving file permissions we need to know the file types.

00:45.070 --> 00:45.500
OK.

00:45.730 --> 00:50.320
So let's see the file types are available inside the Linux environment.

00:50.380 --> 00:59.740
The first type is the regular fights Regel files means that could be a text file or any image file or

00:59.740 --> 01:01.930
in the Final Exit could well file.

01:02.020 --> 01:08.340
OK all these files are comes under the category of regular files and these are denoted by this hyphen

01:08.350 --> 01:15.200
symbol then the directory files all the directories that are present in the links are calderas the directory

01:15.220 --> 01:21.360
files they're treated as files and they are now read by the symbol D.

01:21.580 --> 01:24.970
And the third type of file is a special file so.

01:25.200 --> 01:27.840
They are having their special purposes.

01:27.880 --> 01:30.930
So let's see those special files here.

01:30.940 --> 01:38.230
The first kind is the block file the block files are the hardware files and which are located inside

01:38.230 --> 01:41.500
the directory OK we're going to see it later.

01:41.560 --> 01:42.730
How that looks.

01:42.760 --> 01:48.770
But for now just understand block files are the hardware files and denoted by the symbol B.

01:48.880 --> 01:51.650
Then the next file sarcastic to do X Files.

01:51.870 --> 01:58.720
And these are denoted by symbol C and like a standard input output stream they are work like input output

01:58.720 --> 02:00.140
stream.

02:00.460 --> 02:03.160
Then the next category is by face.

02:03.170 --> 02:05.610
These are denoted by symbol B.

02:05.770 --> 02:08.260
And these are also called as the FIFO.

02:08.260 --> 02:10.090
That is first in first out.

02:10.280 --> 02:10.860
OK.

02:11.230 --> 02:17.610
The next step is symbolic links or symbolic files and these are denoted by the symbol.

02:17.670 --> 02:18.490
OK.

02:18.640 --> 02:21.650
In windows we can create a shot good for any file.

02:21.690 --> 02:24.670
Ok so the symbolic links are work like that.

02:24.820 --> 02:28.130
And these are denoted by symbolical.

02:28.310 --> 02:28.900
OK.

02:29.200 --> 02:32.310
The next and the last type of file is socket files.

02:32.320 --> 02:40.870
And these are denoted by symbol s and these files are used by these applications to communicate with

02:40.960 --> 02:41.810
each other.

02:41.960 --> 02:46.710
OK so these are the basic file types which are present in the Linux environment.

02:46.750 --> 02:47.070
OK.

02:47.110 --> 02:48.030
So let's see.

02:48.040 --> 02:55.330
Practically now how to view these types and also how to apply different kinds of access permissions

02:55.330 --> 02:57.020
to the file folders.

02:57.690 --> 03:01.250
Well first of all let's understand the file types here.

03:01.270 --> 03:05.390
So let's get inside there and here.

03:06.000 --> 03:07.530
Yes.

03:08.000 --> 03:08.570
OK.

03:08.740 --> 03:16.890
Now here you can see at the beginning shows us see the inner hard at some file shows the.

03:17.050 --> 03:17.510
OK.

03:17.590 --> 03:20.660
Let's try it again.

03:21.110 --> 03:21.560
OK.

03:21.580 --> 03:27.010
Here you can see at the beginning of some file it shows B and then.

03:27.150 --> 03:27.860
OK.

03:27.880 --> 03:30.700
All these beginning characters didn't mind the file.

03:30.760 --> 03:35.110
Ok whether it is a directory or a block file or symbolically.

03:35.140 --> 03:35.680
OK.

03:35.920 --> 03:44.770
So with this come on we can see the file type here and the next three options here determine the permissions

03:45.280 --> 03:52.540
and the permissions are categorized in three types that this user group and other users.

03:52.810 --> 03:55.660
OK let's understand this here.

03:55.750 --> 04:01.260
The first three here little minds read and write access for user.

04:01.360 --> 04:01.790
OK.

04:01.930 --> 04:07.020
The first three it reminds the user access means so what kind of permissions.

04:07.020 --> 04:13.990
The user is having for this fine then the next tree determines the group what kind of permissions the

04:13.990 --> 04:16.180
group is having for these files.

04:16.360 --> 04:22.960
So this file is currently having a read write permissions for the group and also for the owner or the

04:22.960 --> 04:23.560
user.

04:23.710 --> 04:24.400
OK.

04:24.460 --> 04:31.570
And the next are the last three that are wise to all the user permissions means what other users could

04:31.570 --> 04:33.310
do with this file.

04:33.510 --> 04:33.940
OK.

04:34.120 --> 04:37.380
So these permissions here are read and write.

04:37.390 --> 04:44.890
So in this way these permissions are set here in the Linux environment so they can serve this permission

04:44.890 --> 04:46.620
in the same manner.

04:46.780 --> 04:47.350
OK.

04:47.440 --> 04:49.900
Here with the help of see more come on.

04:49.900 --> 04:52.670
So let's get to the home directory here.

04:52.990 --> 04:54.490
Let's get the here.

04:54.550 --> 04:55.920
There are two files.

04:55.920 --> 04:59.750
So first of all let's remove these files.

05:00.860 --> 05:08.490
Came in directly and you got the key.

05:08.900 --> 05:09.610
OK.

05:09.850 --> 05:11.420
Let's create a new file.

05:11.750 --> 05:12.670
STUDENT.

05:12.770 --> 05:13.910
Yes.

05:14.490 --> 05:17.080
Now do the permissions.

05:17.420 --> 05:17.870
OK.

05:17.910 --> 05:24.950
It is Harry Reid the writer for owner or the user then for a group it is having read write and for other

05:24.960 --> 05:27.650
users it is having only read access.

05:27.660 --> 05:29.880
So how to change the permissions.

05:30.180 --> 05:37.540
So with the permission there are two methods to change or set the permissions for a file or folder.

05:37.620 --> 05:40.430
The first one is alphabetic order.

05:40.440 --> 05:41.340
You can call it.

05:41.340 --> 05:46.050
It takes permission and the next one is numeric mid-tone.

05:46.080 --> 05:49.800
So let's see how to apply different permissions here.

05:49.970 --> 05:54.000
That text Rogel textual Stylistics still way.

05:54.060 --> 06:01.050
So you know there is a common quality more it's used more you can search different permissions for a

06:01.050 --> 06:02.540
file or folder.

06:02.910 --> 06:12.030
So suppose I want to set the permissions for the user so to stype you then the permission you need to

06:12.050 --> 06:13.490
add a symbol.

06:13.710 --> 06:19.340
And suppose I want to add only what I want to add or read write promotion.

06:19.370 --> 06:28.540
R stands for W4 right and x4 execute and then the file name the file name is still student be XTi.

06:28.560 --> 06:30.820
Now let's do.

06:30.930 --> 06:33.260
Sorry Alice.

06:33.480 --> 06:39.690
And here you can see we set the permissions for the user that is read write and execute.

06:39.990 --> 06:44.240
And for a group there is only a read and write permission.

06:44.770 --> 06:52.270
So suppose I want to set the same permission for group and then just replace this youth with G.

06:52.320 --> 06:55.630
Now is permissions applied to the group.

06:56.280 --> 06:58.070
So let's view.

06:58.260 --> 07:03.550
And now here you can see the read write and execute permissions applied to the group.

07:03.930 --> 07:11.850
And suppose I want to pare it to other users means the user which are not belonging to the group ok.

07:11.970 --> 07:14.780
Or it is not the owner of the file.

07:14.810 --> 07:21.720
Then for those kinds of user I want to add the simple machine that is read write and execute and then

07:21.720 --> 07:26.100
simply replace this it all or stands for other uses.

07:26.100 --> 07:30.620
And hit enter and see here again.

07:30.780 --> 07:37.890
Now here you can see user group and other users all are having the read write execute permission for

07:37.890 --> 07:38.670
this file.

07:38.850 --> 07:46.070
I get in this way you can set the permissions for a file with prophecy is more common and what you do

07:46.140 --> 07:49.750
if you want to remove the permissions from a file.

07:50.070 --> 07:52.240
So just replace this symbol.

07:52.350 --> 07:59.160
When this enter and let's see the result.

07:59.290 --> 08:05.700
OK here you can see all the permissions are removed for the other users.

08:05.710 --> 08:10.880
Suppose I want to insert only read the permissions.

08:10.870 --> 08:15.560
Now just read on.

08:16.040 --> 08:23.950
And here you can see other uses and having only the permissions in this way you can set the permissions.

08:24.430 --> 08:30.200
OK you can add all the permission at that time or remove all the permissions for a file.

08:30.370 --> 08:42.240
OK at the same time with the technique like this you all OK and just minus and then right x.

08:42.250 --> 08:50.380
I want to remove right and exclude permissions from all that is user group and other people or other

08:50.680 --> 08:59.430
users then simply hit enter and no let's view helis.

09:00.460 --> 09:06.260
And here you can see I've removed the right and executive permissions for user group and other users

09:06.310 --> 09:10.840
and here only reader permission is allowed for all the users.

09:10.980 --> 09:20.180
And in the same way you can add this permission at the same time that is with the help of this combination

09:20.180 --> 09:26.070
the Yuji hopeless in the blue that is only read and write.

09:26.260 --> 09:29.090
Now let's view.

09:30.110 --> 09:30.580
OK.

09:30.580 --> 09:35.570
Now here again the user group and other users are having the read write permission.

09:35.590 --> 09:41.210
So in this way you can set or remove the permissions for a file.

09:41.590 --> 09:46.960
Ok this is the alphabetic or textual way to add the permissions.

09:47.000 --> 09:48.090
OK under Linux.

09:48.130 --> 09:51.250
So the next way I would like to show you is the numeric way.

09:51.430 --> 10:00.720
So in the normal form for really permission there is a value collarless for an For write permission.

10:00.730 --> 10:03.800
Number two is used and for secured permission.

10:03.820 --> 10:05.320
Number one is user.

10:05.440 --> 10:14.170
So if you want to had real permissions for all get the permission Neki for all that is user group and

10:14.170 --> 10:17.510
other users you can simply use food for food.

10:17.630 --> 10:18.350
OK.

10:18.460 --> 10:19.680
And hit enter.

10:19.720 --> 10:21.320
Now let's view.

10:21.930 --> 10:22.370
OK.

10:22.420 --> 10:28.660
Now here you can see the root permission is applied to all these user groups and other users.

10:29.080 --> 10:33.150
And suppose we want to add a read and write permission.

10:33.190 --> 10:41.710
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

10:41.710 --> 10:42.400
six.

10:42.400 --> 10:55.360
So six now read and write permissions that apply to the user id enter Gil sorry again not read write

10:55.360 --> 10:57.850
permissions are applied to the user.

10:57.850 --> 11:04.240
And if you want to add all the permissions to the user then you need to add the exact permission means

11:04.240 --> 11:07.000
one to this six that is seven.

11:07.420 --> 11:07.980
OK.

11:08.140 --> 11:11.150
So dental.

11:12.460 --> 11:17.150
And now read write execute permissions are applied to the user here.

11:17.270 --> 11:17.680
OK.

11:17.800 --> 11:18.860
Or the owner.

11:19.120 --> 11:25.780
So in this way you can't simply do this mathematical combination or numeric combination and you can

11:25.840 --> 11:29.560
apply the permissions to the file.

11:29.560 --> 11:36.940
Suppose I want to apply these permissions to all that user group and or do then I can simply add this

11:36.940 --> 11:39.110
convention here 7 7 7.

11:39.490 --> 11:40.100
OK.

11:40.390 --> 11:42.150
Now let's do the research.

11:42.490 --> 11:48.360
And here you can see for all that is user group and other users all the permissions are applied.

11:48.480 --> 11:49.160
OK.

11:49.510 --> 11:57.450
So in this way you can set the permissions for a file or folder inside the Linux environment.

11:57.490 --> 11:57.960
OK.

11:58.190 --> 11:58.450
OK.

11:58.450 --> 11:59.720
There are some switches.

11:59.770 --> 12:00.520
OK.

12:00.550 --> 12:02.350
You can use here.

12:02.360 --> 12:04.610
Go see it's more common I suppose.

12:04.840 --> 12:09.340
There is a directory and subdirectory and you want to like the result could then.

12:09.390 --> 12:13.860
In which case you can use the switch Ifan are OK.

12:14.080 --> 12:22.030
And if you want to apply the result OK to each file inside a directory then in that case you can use

12:22.270 --> 12:23.590
her fancy.

12:23.920 --> 12:26.880
And if there are some error messages.

12:27.220 --> 12:33.520
Is this command is showing then in that case you can use Hi-Point have to block that error messages

12:33.580 --> 12:35.160
in the output.

12:35.170 --> 12:42.350
There is also a technique to apply if you said 0 0 0 ok then all the permissions are removed.

12:42.340 --> 12:44.010
Here from this file.

12:44.080 --> 12:49.050
So if you are trying to read it let's look at student Lochley XTi.

12:49.120 --> 12:49.410
OK.

12:49.420 --> 12:51.640
It says permission is denied.

12:51.640 --> 12:56.370
You need to be sudo access or administrator Google these file contents.

12:57.310 --> 13:06.520
So now after removing here all the permissions if you want to add the permission to user group and to

13:06.550 --> 13:09.790
other users then you can simply go like this.

13:09.800 --> 13:17.020
école who are the X this will add a read write an executive permissions all OK.

13:17.090 --> 13:21.790
So don't tell us.

13:22.640 --> 13:26.150
And here you can see all the permissions applied.

13:26.350 --> 13:34.860
So in this way you can manage or set up the permissions file or folder and you can block an authorized

13:34.880 --> 13:36.390
user access.

13:36.400 --> 13:36.960
OK.

13:37.060 --> 13:38.840
With the help of these permissions.
