1
00:00:04,640 --> 00:00:09,710
We have just successfully created the new user using Gamal's Our Command, the cold add user.

2
00:00:10,100 --> 00:00:15,570
And this comment is much more convenient for use as a user add comment because it has interactive a

3
00:00:15,570 --> 00:00:15,990
bronze.

4
00:00:16,100 --> 00:00:21,040
And you are able to set the working directory, password and other settings just in one command.

5
00:00:21,740 --> 00:00:22,040
Great.

6
00:00:22,280 --> 00:00:27,710
No, let me demonstrate to how to change ownership for specific file or directory.

7
00:00:28,160 --> 00:00:32,150
And let me create new file in home directory for this Bogdana user.

8
00:00:32,330 --> 00:00:34,160
But under route user account.

9
00:00:34,760 --> 00:00:37,760
Let's go back to a rude session exit.

10
00:00:37,970 --> 00:00:40,640
And here now I am locked in as a road user.

11
00:00:40,970 --> 00:00:42,140
And no, let's greet you.

12
00:00:42,170 --> 00:00:44,090
File into home slash Mogadon.

13
00:00:44,690 --> 00:00:49,820
Let's use a touch command touch slash home slash Mogadon.

14
00:00:50,180 --> 00:00:52,490
And here we'll be file name do.

15
00:00:52,630 --> 00:00:55,550
The steam file was created.

16
00:00:55,610 --> 00:00:58,670
Let's not list contents of the home Mogadon directory.

17
00:00:59,330 --> 00:01:00,160
Let's add here.

18
00:01:00,230 --> 00:01:00,750
This L.

19
00:01:00,980 --> 00:01:01,610
A options.

20
00:01:02,030 --> 00:01:03,920
And now a seat in your file.

21
00:01:04,019 --> 00:01:05,090
To dig deep.

22
00:01:05,570 --> 00:01:08,580
But user name and group are set.

23
00:01:09,560 --> 00:01:13,370
Because I have just created this file as a road user.

24
00:01:14,040 --> 00:01:16,280
Now let's change to Bogdana user.

25
00:01:16,340 --> 00:01:22,170
As you dash Mogadon, let's clear terminal and let's list contents of home directory here.

26
00:01:22,400 --> 00:01:25,470
Ondar Bogdan user and no, I still see here.

27
00:01:25,520 --> 00:01:31,030
This is the text file that we have just created as s road user and endorse Combes.

28
00:01:31,100 --> 00:01:33,350
You'll see this information route Android.

29
00:01:34,100 --> 00:01:39,650
Now let's try to modify this file to put the 60 under Bogdana account.

30
00:01:40,130 --> 00:01:43,270
Let's use Nantel editor and type two Deakes D.

31
00:01:43,370 --> 00:01:44,090
S argument.

32
00:01:44,630 --> 00:01:47,690
And here you'll see that file, two dicks D unwrite.

33
00:01:48,560 --> 00:01:50,980
And that is due to ownership issue.

34
00:01:51,590 --> 00:01:53,570
Owner of this file is ruled.

35
00:01:54,170 --> 00:02:00,110
And of course, when you have a look at those permissions, you'll see that only owner of this file

36
00:02:00,200 --> 00:02:02,480
is able to write this file.

37
00:02:02,630 --> 00:02:11,660
Here you see this W Özer users that are members of this group or other groups are not able to write

38
00:02:11,720 --> 00:02:12,440
this file.

39
00:02:13,130 --> 00:02:15,000
That's why we are not able to modify it.

40
00:02:15,760 --> 00:02:22,640
And in order to solve this problem, you are able ise or change permissions or change ownership of this

41
00:02:22,640 --> 00:02:23,060
file.

42
00:02:23,840 --> 00:02:31,130
This file is located in the home directory for Bogdana user, and logically it's better to change ownership

43
00:02:31,190 --> 00:02:35,960
of this file because again, this file is located in the home directory for Abbadon User.

44
00:02:36,350 --> 00:02:36,890
Let's do that.

45
00:02:37,190 --> 00:02:38,840
For that, you need to use comment, John.

46
00:02:39,110 --> 00:02:39,590
This one.

47
00:02:40,070 --> 00:02:42,650
Let's first have a look at health options for this comment.

48
00:02:43,340 --> 00:02:50,090
Let's scroll a bit up to the beginning of this output and you'll see that this comment is used for change

49
00:02:50,180 --> 00:02:54,830
of the owner and or group for specific file or files.

50
00:02:55,790 --> 00:02:59,010
And you'll see that the throws to you need to specify options, if any.

51
00:02:59,400 --> 00:03:05,060
Afterwords, you'll need to specify you own or optionally and a new group optionally.

52
00:03:05,360 --> 00:03:09,790
And afterwards comes file or files list right at the next.

53
00:03:10,160 --> 00:03:12,050
Let's clear terminal and type shown.

54
00:03:12,470 --> 00:03:14,160
Next comes user name.

55
00:03:14,240 --> 00:03:17,010
We want to change ownership of the file too.

56
00:03:17,570 --> 00:03:18,450
It will be Bogdan.

57
00:03:18,740 --> 00:03:21,350
And next comes file name to the text.

58
00:03:21,920 --> 00:03:25,130
Let's try to enter discussions here under backdowns account.

59
00:03:25,420 --> 00:03:25,830
Enter.

60
00:03:26,360 --> 00:03:30,140
And of course I see here arrow operation not permitted.

61
00:03:30,740 --> 00:03:31,170
Good guess.

62
00:03:31,280 --> 00:03:32,630
What is the reason for this error?

63
00:03:32,840 --> 00:03:33,170
Why?

64
00:03:33,220 --> 00:03:36,020
I am not able to change ownership of this file.

65
00:03:36,560 --> 00:03:37,370
Backdowns account.

66
00:03:40,330 --> 00:03:42,040
Your right answer is very simple.

67
00:03:42,130 --> 00:03:48,240
We are not able to modify this file under any of other accounts except only protocol.

68
00:03:49,130 --> 00:03:54,610
That's why I need to perform this action under Rouda code and afterwards go back to Baghdad's account,

69
00:03:54,910 --> 00:03:58,870
and then I will be able to modify this file as owner of this file.

70
00:03:59,350 --> 00:03:59,730
All right.

71
00:03:59,980 --> 00:04:04,530
Let's go back to old account exit and less five percent comment.

72
00:04:04,600 --> 00:04:05,670
Joan Mogadon.

73
00:04:05,920 --> 00:04:11,680
But now I need to enter a full path to this, to the Deakes defile, because now I'm the home directory

74
00:04:11,680 --> 00:04:12,570
for road user.

75
00:04:12,910 --> 00:04:18,269
So I am type in here, slash home, slash mogadon, slash to the extreme.

76
00:04:19,180 --> 00:04:21,380
And Nola's very fire wells are ownership.

77
00:04:21,490 --> 00:04:22,240
What's changed?

78
00:04:22,370 --> 00:04:24,280
Unless this L.A. home Mogadon.

79
00:04:25,570 --> 00:04:33,070
And yes, I see that no owner of this file to the Deakes D is Mogadon, but group remained unchanged.

80
00:04:33,100 --> 00:04:33,960
The still ruled.

81
00:04:35,100 --> 00:04:37,570
And that's probably not what you have expected.

82
00:04:37,990 --> 00:04:40,540
If you want to change your group as well.

83
00:04:40,750 --> 00:04:43,000
You need to slightly modify this command.

84
00:04:43,090 --> 00:04:45,470
Let's go back to this command, John Bogdan.

85
00:04:45,850 --> 00:04:50,140
And here after Colin, you'll need to specify group name.

86
00:04:50,680 --> 00:04:53,260
It will be Bogdan, last press, Panter.

87
00:04:53,440 --> 00:04:57,190
And no, let's verify whether something was changed here or not.

88
00:04:57,520 --> 00:05:02,150
And yes, now I see user and group equal to Bogdan, my username.

89
00:05:02,890 --> 00:05:05,200
Let's not go back to Bo Daniels R.

90
00:05:05,250 --> 00:05:10,390
S you dash Mogadon and let's have a look at the contents of home directory.

91
00:05:10,570 --> 00:05:14,650
And now I see correct ownership of this file to the text.

92
00:05:15,280 --> 00:05:20,260
And of course, because now I'm owner of this file, I am able to write this file.

93
00:05:20,320 --> 00:05:20,980
Modify it.

94
00:05:21,510 --> 00:05:22,600
Let's try to modify it.

95
00:05:22,700 --> 00:05:29,340
Nannerl to the extreme modified file with say it changes control.

96
00:05:30,100 --> 00:05:30,610
Yes.

97
00:05:30,700 --> 00:05:33,910
Enter and now file was successfully changed.

98
00:05:34,360 --> 00:05:36,070
Let's have a look at the contents of this file.

99
00:05:36,130 --> 00:05:37,180
Got to the 60.

100
00:05:37,540 --> 00:05:38,670
And yes, I see here.

101
00:05:38,700 --> 00:05:40,180
Contents modified file.

102
00:05:40,880 --> 00:05:40,970
This.

103
00:05:40,990 --> 00:05:45,040
That's how you are able to modify ownership for a specific file.

104
00:05:45,580 --> 00:05:49,870
In the same way you are able to modify ownership for a specific directory.

105
00:05:50,320 --> 00:05:51,220
Let's quickly do that.

106
00:05:51,580 --> 00:05:58,000
And the less great new directory here in whole folder for Bowdon user and Lizardo to the gain as road

107
00:05:58,000 --> 00:05:58,390
user.

108
00:05:58,660 --> 00:06:00,370
Let's go back to the account.

109
00:06:00,430 --> 00:06:07,770
And here, let's create a new folder in the home of Moghadam and let's name it DMP.

110
00:06:08,610 --> 00:06:14,730
And now if I list contents of a home Mogadon, I'll see this new folder here.

111
00:06:14,770 --> 00:06:18,070
And the owner is old and group is route as well.

112
00:06:18,330 --> 00:06:20,900
And let's create a new file on this team before either.

113
00:06:21,130 --> 00:06:24,170
Let's actually ceded to this team before there are.

114
00:06:24,210 --> 00:06:28,440
I'll copy this folder name like so and let's touch three to dig deep.

115
00:06:28,520 --> 00:06:33,080
And for the tax deal, I'll create two new files here in Team B folder.

116
00:06:33,100 --> 00:06:33,700
Here they are.

117
00:06:34,090 --> 00:06:36,980
And of course, owner of those files is rude.

118
00:06:37,450 --> 00:06:37,840
All right.

119
00:06:38,140 --> 00:06:43,000
Let's now try to modify ownership for entire folder, Tempy folder.

120
00:06:43,490 --> 00:06:46,190
Let's see, city two home directory for what yours are.

121
00:06:46,620 --> 00:06:48,210
And let's enter Joan.

122
00:06:48,850 --> 00:06:50,970
Next comes a bog down column, Bogdan.

123
00:06:51,370 --> 00:06:56,050
And here will be a path to this team before the slash home slash Mogadon.

124
00:06:56,140 --> 00:06:57,800
And here we'll be dimpy like.

125
00:06:57,800 --> 00:06:59,240
So let's press.

126
00:06:59,830 --> 00:07:02,430
And no, let's at least contents of the home.

127
00:07:02,780 --> 00:07:08,440
Bogdan and I'll see that owner of team before there was changed to Mogadon.

128
00:07:08,860 --> 00:07:16,140
But if I have a look at the contents of that DMP folder, I'll still see owner root for bolls files

129
00:07:16,240 --> 00:07:18,400
three to dig deep and for the DXP.

130
00:07:18,970 --> 00:07:27,730
And that means that I have just adjusted owner only of the folder directory Tempy and ownership of any

131
00:07:27,820 --> 00:07:30,880
included files or subdirectories was not changed.

132
00:07:31,390 --> 00:07:36,790
If you want to change alter owner of the files, you need to use additional option.

133
00:07:37,150 --> 00:07:39,960
Let's have a look at the help for Joan comment.

134
00:07:40,000 --> 00:07:41,050
Joan, that does help.

135
00:07:42,680 --> 00:07:44,160
And scroll a bit up.

136
00:07:45,850 --> 00:07:46,810
And you'll find here.

137
00:07:46,870 --> 00:07:50,440
Option Das Kapital are or there's that recourse.

138
00:07:50,980 --> 00:07:57,670
And with this option in place, you'll be able to modify ownership of all their files and directories.

139
00:07:58,210 --> 00:07:59,680
Let's try to use this option.

140
00:08:00,040 --> 00:08:01,600
Let's clear terminal and type.

141
00:08:01,710 --> 00:08:04,900
John, next comes option Das Kapital.

142
00:08:05,530 --> 00:08:08,830
Next, we will type by user name and the group name.

143
00:08:08,980 --> 00:08:10,770
We want to change ownership, too.

144
00:08:11,120 --> 00:08:13,320
And here will be a path to folder.

145
00:08:13,390 --> 00:08:14,920
We want to change ownership.

146
00:08:15,320 --> 00:08:18,280
Here will be home Mogadon DMP.

147
00:08:18,340 --> 00:08:20,260
Like so let's press enter.

148
00:08:20,440 --> 00:08:21,620
And now let's verify.

149
00:08:21,670 --> 00:08:22,870
Where's our files.

150
00:08:22,910 --> 00:08:25,290
Older a ship in this thing before there was changed on.

151
00:08:25,990 --> 00:08:30,850
Let me copy this path and alas this L.A. and based Corbitt path.

152
00:08:31,180 --> 00:08:34,640
And now I see that owner for those files through the takes.

153
00:08:34,840 --> 00:08:35,440
And follow takes.

154
00:08:35,460 --> 00:08:38,110
He was correctly changed to Mogadon.

155
00:08:38,830 --> 00:08:45,850
And of course, if I go back to Bowdens account as you Mogadon and verify contents of a home directory

156
00:08:46,120 --> 00:08:51,240
and the list files and folders in Dimpy folder, I'll see correct ownership everywhere.

157
00:08:51,670 --> 00:08:57,190
And that means that now I am able to modify those files to take stock of what it takes to at least write

158
00:08:57,190 --> 00:08:57,760
it weekly and.

159
00:08:58,400 --> 00:09:00,230
Dean Beiste less through the D..

160
00:09:00,640 --> 00:09:07,290
Here I am using a relative path without any slashers or I am actually able to use the same syntax fielder.

161
00:09:07,720 --> 00:09:09,040
And here will be a slash.

162
00:09:09,280 --> 00:09:14,710
It means that I am accessing specific file inside of the home directory of this user.

163
00:09:15,190 --> 00:09:16,210
Lets press enter.

164
00:09:16,240 --> 00:09:18,980
And here at the hello saved changes.

165
00:09:19,060 --> 00:09:19,450
Yes.

166
00:09:19,510 --> 00:09:19,980
Enter.

167
00:09:20,410 --> 00:09:22,690
And now let's read the contents of this file.

168
00:09:22,720 --> 00:09:23,270
Team B.

169
00:09:23,440 --> 00:09:23,780
Three.

170
00:09:24,340 --> 00:09:25,640
Steve and I see it.

171
00:09:25,660 --> 00:09:26,650
Those contents here.

172
00:09:27,160 --> 00:09:34,660
That's how we have successfully changed ownership for an entire directory and all in their files and

173
00:09:34,660 --> 00:09:35,380
directories.

174
00:09:35,880 --> 00:09:36,160
Right.

175
00:09:36,530 --> 00:09:37,510
That's all for this lecture.

176
00:09:37,570 --> 00:09:41,950
And now you'll understand how to change ownership for a specific file.

177
00:09:42,070 --> 00:09:43,840
Files or directories.

178
00:09:44,470 --> 00:09:48,780
Next, let's talk about permissions and I'll explain you how to modify permissions.

179
00:09:49,300 --> 00:09:53,900
And I'll actually demonstrate to source how to create executable script links.

180
00:09:54,310 --> 00:09:58,120
And we will with very basic, simple sweep that will simply print.

181
00:09:58,180 --> 00:09:59,620
Hello, roll to the terminal.

182
00:09:59,920 --> 00:10:01,390
I'll see you in the next lecture, guys.

183
00:10:01,480 --> 00:10:01,800
Bye bye.

