1
00:00:00,500 --> 00:00:02,630
Reading, writing and executing.

2
00:00:02,630 --> 00:00:11,240
So access rights to files and directories are defined in terms of read access, write access and execution

3
00:00:11,240 --> 00:00:11,870
access.

4
00:00:11,870 --> 00:00:19,670
So if we look at the output of the command right here and you will see here LSL here, so you will see

5
00:00:19,670 --> 00:00:25,640
here that we can see, we can get some clue as how this is implemented.

6
00:00:25,640 --> 00:00:32,540
So in previous lectures we learned about file attributes and the first characters is the file type.

7
00:00:33,550 --> 00:00:37,690
So the file type describes the file types you are most likely to see.

8
00:00:37,690 --> 00:00:41,170
And there are other less common types to do.

9
00:00:41,170 --> 00:00:43,360
For example, this here.

10
00:00:43,390 --> 00:00:45,100
This means a regular file.

11
00:00:45,280 --> 00:00:47,650
This first attributes means here.

12
00:00:47,650 --> 00:00:54,130
So let me actually write that down here and you will see what is going on here.

13
00:00:54,130 --> 00:00:59,540
So the minus here means a regular file.

14
00:00:59,570 --> 00:01:01,900
Regular file.

15
00:01:01,900 --> 00:01:03,820
And as you can see here, some of examples.

16
00:01:03,820 --> 00:01:09,340
For example, my file, my name here, this might be like my new dear back, but the name.

17
00:01:09,340 --> 00:01:10,230
Just a minute.

18
00:01:10,390 --> 00:01:11,410
It's actually a file.

19
00:01:11,410 --> 00:01:15,490
And as you can see here, it starts with this attribute.

20
00:01:15,880 --> 00:01:21,580
All of the files starts with the, uh, the regular file starts with this attributes.

21
00:01:21,610 --> 00:01:26,230
We also have notice here we have a directory.

22
00:01:27,260 --> 00:01:28,670
Directory here.

23
00:01:30,210 --> 00:01:33,060
The IS directory.

24
00:01:35,670 --> 00:01:37,280
And we also have l.

25
00:01:37,380 --> 00:01:38,810
This is a symbol.

26
00:01:38,820 --> 00:01:41,850
This is for the symbolic links that we learned earlier.

27
00:01:41,850 --> 00:01:48,960
In this case, we don't have symbolic links and we will create that symbolic symbolic link.

28
00:01:50,040 --> 00:01:54,000
See here means a character special file.

29
00:01:55,050 --> 00:01:55,620
Here.

30
00:01:55,650 --> 00:02:00,510
This is a character special file.

31
00:02:00,510 --> 00:02:08,880
And this file type refers to a device that handles data as a stream of bytes such as terminal or dev

32
00:02:08,880 --> 00:02:09,540
null.

33
00:02:09,540 --> 00:02:17,340
And we also have B, the B is for a special file block, special file block, special file.

34
00:02:17,340 --> 00:02:24,180
And this file types refer to a device that handles data in blocks such as hard drives or DVD drives.

35
00:02:24,180 --> 00:02:30,330
So the remaining nine characters of the file attributes called the file mode here, actually let me

36
00:02:30,330 --> 00:02:31,890
write that down here.

37
00:02:31,890 --> 00:02:35,760
So, for example, let's take this right?

38
00:02:36,740 --> 00:02:37,670
Copy this.

39
00:02:38,690 --> 00:02:39,530
And here.

40
00:02:39,570 --> 00:02:39,960
Oops.

41
00:02:40,940 --> 00:02:41,480
Here.

42
00:02:41,480 --> 00:02:42,820
Open our notepad.

43
00:02:42,830 --> 00:02:43,910
And here.

44
00:02:44,090 --> 00:02:45,260
So this.

45
00:02:45,530 --> 00:02:47,750
This was our directory.

46
00:02:48,050 --> 00:02:50,150
This is a file type directory.

47
00:02:50,150 --> 00:02:50,720
And.

48
00:02:51,110 --> 00:02:54,570
And others are file mode.

49
00:02:54,590 --> 00:03:01,130
So these file modes represents the read, write and execute permissions here.

50
00:03:01,130 --> 00:03:03,750
And actually, let me get my mark here.

51
00:03:03,760 --> 00:03:04,220
Here.

52
00:03:04,220 --> 00:03:06,080
So I can show you better.

53
00:03:07,630 --> 00:03:08,160
Also.

54
00:03:11,050 --> 00:03:14,440
Okay, so let me here.

55
00:03:14,440 --> 00:03:16,810
So this D here.

56
00:03:21,180 --> 00:03:25,590
So these are the file mode here.

57
00:03:25,590 --> 00:03:28,230
So actually, let me write that down here.

58
00:03:28,230 --> 00:03:31,290
So these are file.

59
00:03:32,090 --> 00:03:32,900
Maud.

60
00:03:34,720 --> 00:03:37,120
And the first letter.

61
00:03:37,150 --> 00:03:41,710
The first letter represents us that the represents us.

62
00:03:41,710 --> 00:03:43,180
The file type.

63
00:03:43,750 --> 00:03:44,220
Yeah.

64
00:03:44,230 --> 00:03:45,220
File.

65
00:03:47,250 --> 00:03:47,880
Type.

66
00:03:48,240 --> 00:03:54,660
As I explained, whether it is a regular file directory, symbolic link or cache spatial file or block

67
00:03:54,660 --> 00:03:55,710
spatial file here.

68
00:03:56,890 --> 00:03:57,550
Here.

69
00:03:58,740 --> 00:03:59,430
So.

70
00:04:00,470 --> 00:04:07,960
Uh, and in order to understand that here, first lecture, let me take this down right here.

71
00:04:07,970 --> 00:04:12,500
So the remaining nine characters of file attributes, as I said, is the file mode.

72
00:04:12,590 --> 00:04:16,460
So for the file's owner, the file's group owner or everybody else.

73
00:04:16,460 --> 00:04:24,020
So in this case, for example, it's going to be like, this is for oops, actually, let's here so

74
00:04:24,500 --> 00:04:25,430
one.

75
00:04:30,180 --> 00:04:33,090
That's actually it will be more easier to understand right here.

76
00:04:33,090 --> 00:04:33,810
So.

77
00:04:34,570 --> 00:04:39,610
As I said, this is file type and all of these are.

78
00:04:42,010 --> 00:04:43,450
File permission attributes.

79
00:04:43,450 --> 00:04:50,170
But here the first three, the first three means owner permissions.

80
00:04:50,380 --> 00:04:52,030
The next three.

81
00:04:53,170 --> 00:04:58,720
Means the group permissions, which you will learn all of this about in this section.

82
00:04:58,720 --> 00:05:05,680
And the last means the world that everybody else so the.

83
00:05:06,890 --> 00:05:07,490
Here.

84
00:05:07,490 --> 00:05:09,550
The R here.

85
00:05:09,590 --> 00:05:11,990
R means read.

86
00:05:12,730 --> 00:05:13,570
Read.

87
00:05:14,880 --> 00:05:17,310
The W.

88
00:05:18,130 --> 00:05:20,140
W means.

89
00:05:21,270 --> 00:05:23,780
Execute ops, not execute.

90
00:05:23,790 --> 00:05:25,650
The W means write.

91
00:05:28,060 --> 00:05:32,350
And here x here means.

92
00:05:35,690 --> 00:05:36,440
Execute.

93
00:05:44,550 --> 00:05:48,000
So now let's explain all of this now.

94
00:05:48,000 --> 00:05:48,810
So.

95
00:05:50,810 --> 00:05:59,630
The R here, the R allows a file to be opened and read.

96
00:06:00,080 --> 00:06:06,770
So if this r, you can see this R in a file, for example, in this case this.

97
00:06:07,130 --> 00:06:08,520
Right r.

98
00:06:08,600 --> 00:06:11,770
This means a lot of file to be opened and read.

99
00:06:11,780 --> 00:06:18,140
But if you see this r in directories, this allows a directory contents to be listed if the execute

100
00:06:18,140 --> 00:06:20,030
attribute is also set.

101
00:06:20,060 --> 00:06:22,360
We also have w.

102
00:06:24,650 --> 00:06:26,090
As you learned here.

103
00:06:26,090 --> 00:06:32,410
So the W allows a file to be written or truncated.

104
00:06:32,420 --> 00:06:36,220
However, this attribute does not allow files to be renamed or deleted.

105
00:06:36,230 --> 00:06:45,260
The ability to delete or rename files is determined by directory attributes, and if you see this w

106
00:06:45,260 --> 00:06:52,190
attribute in a directory, this in that in that directory allows a files within a directory to be created,

107
00:06:52,190 --> 00:06:54,440
deleted and renamed here.

108
00:06:54,440 --> 00:07:04,010
So here first one we learned about the file with this w and now so if you open this, if you use this

109
00:07:04,040 --> 00:07:13,280
in directories, you will get gain an access to create, delete and renamed and if the execute arbitrary

110
00:07:13,280 --> 00:07:17,570
is set or actually dir.

111
00:07:18,800 --> 00:07:24,870
So we also have we also have let me here.

112
00:07:28,020 --> 00:07:28,290
Oops.

113
00:07:28,290 --> 00:07:28,950
Yeah, right.

114
00:07:28,980 --> 00:07:29,820
That's actually.

115
00:07:32,460 --> 00:07:34,200
We also have.

116
00:07:34,680 --> 00:07:35,790
The X here.

117
00:07:35,790 --> 00:07:37,150
Actually, let's delete all of this.

118
00:07:37,170 --> 00:07:38,580
So the x?

119
00:07:38,580 --> 00:07:39,690
Just an x.

120
00:07:40,110 --> 00:07:44,500
So this x loves a file to be to.

121
00:07:44,520 --> 00:07:54,420
And by the way, if you use this x in a file, a file loves a file to create a program as a create treat

122
00:07:54,420 --> 00:07:55,950
as a program and execute it.

123
00:07:55,950 --> 00:08:03,300
So program files written in scripting languages must also be set as a readable to be executed.

124
00:08:03,300 --> 00:08:09,150
And here if you use this x in directories, this will use a low.

125
00:08:09,180 --> 00:08:11,700
This is the low directory to be entered.

126
00:08:11,700 --> 00:08:15,690
For example, see the my.

127
00:08:17,290 --> 00:08:17,740
There.

128
00:08:18,880 --> 00:08:27,220
So if you use this in directory X in directory, you can enter and in that directory here.
