WEBVTT - This file was automatically generated by VIMEO

0
00:00:05.800 --> 00:00:08.200
Hello and welcome back to this video.

1
00:00:09.100 --> 00:00:12.600
So we have seen about Linux permissions the three

2
00:00:12.600 --> 00:00:16.000
 people which is the user group and others to

3
00:00:15.300 --> 00:00:19.500
 whom the permissions are given now, let

4
00:00:18.500 --> 00:00:21.200
 us see in case we want to give

5
00:00:21.200 --> 00:00:24.000
 some permission to someone. How do we do that?

6
00:00:24.900 --> 00:00:26.000
So let's quickly see over here.

7
00:00:27.100 --> 00:00:30.600
This is the file which is x y z and we have

8
00:00:30.600 --> 00:00:33.400
 seen the permissions which are given to the

9
00:00:33.400 --> 00:00:36.200
 user which is read right the group which is

10
00:00:36.200 --> 00:00:39.600
 read and others the permission is given which

11
00:00:39.600 --> 00:00:42.800
 is only read. So let's now give

12
00:00:42.800 --> 00:00:45.700
 the permission to others of right as

13
00:00:45.700 --> 00:00:46.500
 well. So

14
00:00:47.500 --> 00:00:50.500
We have to give a permission to others so for

15
00:00:50.500 --> 00:00:54.000
 that we are going to use the command chord and

16
00:00:53.200 --> 00:00:56.600
 we need to give the permission to whom to

17
00:00:56.600 --> 00:00:59.600
 others. So for that we have to press o

18
00:00:59.600 --> 00:01:02.600
 because we need to give permission to others and

19
00:01:02.600 --> 00:01:05.400
 we are giving permissions. So we are going

20
00:01:05.400 --> 00:01:08.700
 to write a plus in case we need

21
00:01:08.700 --> 00:01:11.400
 to remove the permission then what

22
00:01:11.400 --> 00:01:14.400
 should we write? Right we need to

23
00:01:14.400 --> 00:01:17.400
 add a minus. But in this case, we are

24
00:01:17.400 --> 00:01:17.800
 giving

25
00:01:18.900 --> 00:01:21.300
Permission. So we are going to add Plus.

26
00:01:22.200 --> 00:01:25.800
And what permission we need to give of right

27
00:01:25.800 --> 00:01:29.200
 so we are going to use W perfect.

28
00:01:28.200 --> 00:01:31.200
 So now this is a very

29
00:01:31.200 --> 00:01:34.500
 very simple to understand chord is something that you have

30
00:01:34.500 --> 00:01:38.000
 to write you need to give permission to others. So,

31
00:01:37.700 --> 00:01:40.800
 oh you have to give permission. So

32
00:01:40.800 --> 00:01:43.200
 we are adding a permission which is

33
00:01:43.200 --> 00:01:46.200
 denoted by plus and which permission you

34
00:01:46.200 --> 00:01:48.600
 are giving it is right permissions. So w

35
00:01:49.600 --> 00:01:53.300
and the name of the file to which these changes need

36
00:01:52.300 --> 00:01:56.000
 to be done. Now this looks perfect. Now

37
00:01:55.700 --> 00:01:58.800
 after we type this command what

38
00:01:58.800 --> 00:02:00.100
 is going to happen?

39
00:02:01.900 --> 00:02:05.200
Let's see it on to the terminal so chmod

40
00:02:04.200 --> 00:02:07.300
 and we need to give a permission.

41
00:02:07.300 --> 00:02:09.500
 So o plus W.

42
00:02:10.700 --> 00:02:13.500
And to the file XY said and hit enter.

43
00:02:14.300 --> 00:02:17.800
And the command got executed without any

44
00:02:17.800 --> 00:02:20.400
 error. Let's quickly see the permissions now

45
00:02:20.400 --> 00:02:20.800
 and

46
00:02:22.600 --> 00:02:25.500
here we can see a extra W has

47
00:02:25.500 --> 00:02:28.900
 been added which cannot be seen over here. Now.

48
00:02:28.900 --> 00:02:32.000
 This means the permission has been successfully added

49
00:02:31.400 --> 00:02:34.700
 to the file XYZ. And now

50
00:02:34.700 --> 00:02:37.300
 the users the other

51
00:02:37.300 --> 00:02:40.300
 users can edit the file as

52
00:02:40.300 --> 00:02:43.100
 well. So let's quickly switch user to

53
00:02:43.100 --> 00:02:45.300
 the user udemy and now

54
00:02:46.100 --> 00:02:49.800
We are udemy. Let's verify that who am I? I'm the

55
00:02:49.800 --> 00:02:52.400
 user udemy and now we have the right

56
00:02:52.400 --> 00:02:55.700
 permission as well. So let's really read first. So

57
00:02:55.700 --> 00:02:58.200
 read get XYZ and we

58
00:02:58.200 --> 00:03:01.600
 can see we are able to read it. Let's quickly modify

59
00:03:01.600 --> 00:03:03.600
 it using Nano and

60
00:03:04.800 --> 00:03:08.300
let's write this is modified by

61
00:03:08.600 --> 00:03:11.000
 udemy. Let's try to save it.

62
00:03:11.900 --> 00:03:14.300
And we are successfully able to save it.

63
00:03:14.300 --> 00:03:17.700
 Let's see if our changes are successfully

64
00:03:17.700 --> 00:03:18.300
 saved.

65
00:03:19.400 --> 00:03:22.900
And you can see this is modified by Jeremy. Let's

66
00:03:22.900 --> 00:03:25.200
 verify again. Let's try to read

67
00:03:25.200 --> 00:03:28.800
 this file by the user root. And yes.

68
00:03:30.400 --> 00:03:33.400
We are able to successfully see the changes that

69
00:03:33.400 --> 00:03:36.400
 has been done into the file by the other

70
00:03:36.400 --> 00:03:39.300
 user which is udemy. Perfect.

71
00:03:39.900 --> 00:03:42.900
So now we know how to give permission. So

72
00:03:42.900 --> 00:03:45.300
 I hope you guys understood how you can

73
00:03:45.300 --> 00:03:48.600
 give permissions to any user. So

74
00:03:48.600 --> 00:03:51.600
 in case you want to give permission to a group for

75
00:03:51.600 --> 00:03:55.200
 that you're using the symbol G Plus which

76
00:03:54.200 --> 00:03:57.200
 permission you need to give read write

77
00:03:57.200 --> 00:04:00.200
 execute and the file name similarly. You want

78
00:04:00.200 --> 00:04:03.200
 to give some permission to the user who has created the

79
00:04:03.200 --> 00:04:06.600
 file. So let's say U plus r w x and x

80
00:04:06.600 --> 00:04:09.200
 y z. Let's try to see it over

81
00:04:09.200 --> 00:04:12.800
 here. Let's try to see the first the permissions and

82
00:04:12.800 --> 00:04:14.400
 let's give all the permissions.

83
00:04:15.200 --> 00:04:18.400
To the user so you plus r w

84
00:04:18.400 --> 00:04:19.700
 x and the file name.

85
00:04:20.200 --> 00:04:23.500
Let's see the permission now and you can see read write

86
00:04:23.500 --> 00:04:26.900
 execute is the permission which is given 2 the

87
00:04:26.900 --> 00:04:29.400
 user. So now all the

88
00:04:29.400 --> 00:04:32.700
 permissions are being to the user the

89
00:04:32.700 --> 00:04:35.300
 group has the read permission and others have

90
00:04:35.300 --> 00:04:38.200
 reached right permission. Now in case you want to give

91
00:04:38.200 --> 00:04:41.400
 all the permissions to everyone all the three

92
00:04:41.400 --> 00:04:44.500
 category of people which is the user group

93
00:04:44.500 --> 00:04:47.200
 and others for that. You simply need

94
00:04:47.200 --> 00:04:50.500
 to write chord A a means all

95
00:04:50.500 --> 00:04:52.400
 and what permission you need to give.

96
00:04:53.200 --> 00:04:54.200
all the permissions

97
00:04:55.100 --> 00:04:58.300
So you can do it this way. Let's try to see the

98
00:04:58.300 --> 00:05:02.300
 permissions now and you can see rwx rwx

99
00:05:01.300 --> 00:05:04.700
 and rwx now. All

100
00:05:04.700 --> 00:05:07.500
 the permissions are given to the user group

101
00:05:07.500 --> 00:05:08.900
 and others perfect.

102
00:05:09.700 --> 00:05:12.200
Now you must be wondering what does this

103
00:05:12.200 --> 00:05:16.100
 hyphen represent? This basically represents in

104
00:05:15.100 --> 00:05:18.300
 this case. Nothing that this is a

105
00:05:18.300 --> 00:05:22.000
 file in case it is a directory there would

106
00:05:21.100 --> 00:05:25.000
 have been a d over there which represents

107
00:05:24.500 --> 00:05:27.400
 that this is a directory and

108
00:05:27.400 --> 00:05:30.200
 it is not a file. That's it. So, I hope you

109
00:05:30.200 --> 00:05:33.700
 guys understood this how you can add permissions in

110
00:05:33.700 --> 00:05:36.300
 the next lesson. We are going to see how you can

111
00:05:36.300 --> 00:05:38.400
 remove permissions. Thank you.
