1 00:00:00,110 --> 00:00:00,950 Hello, everyone. 2 00:00:00,950 --> 00:00:05,360 In this lesson, I'm going to talk about the file ownership and permission. 3 00:00:05,480 --> 00:00:10,730 So as we can see here in the graph, so the first digit here represents the type of the file and we 4 00:00:10,730 --> 00:00:13,580 have the D, the D is the directory. 5 00:00:13,730 --> 00:00:16,910 If we have the dash, this is represent a txt file. 6 00:00:16,940 --> 00:00:20,270 But in our example here we have the d which is the directory. 7 00:00:20,300 --> 00:00:23,870 Then the next three digits we have the owner permission. 8 00:00:23,870 --> 00:00:29,750 So we have the read and write and execute and the next three digits we have the group permission, we 9 00:00:29,750 --> 00:00:32,860 only have the read or write, we don't have an execute permission. 10 00:00:32,870 --> 00:00:38,780 The third one we have for the other, we have the read and execute permissions, but we don't have the 11 00:00:38,780 --> 00:00:39,710 write permission. 12 00:00:39,710 --> 00:00:46,580 So number two, here we have the number of the links and Tom is the owner of this directory. 13 00:00:46,730 --> 00:00:52,730 And Linux is the the group or is the owner group of this directory. 14 00:00:52,730 --> 00:00:59,540 And here is the size of the directory and here is the date that we created this directory and this is 15 00:00:59,540 --> 00:01:01,260 the name of the directory. 16 00:01:01,930 --> 00:01:05,740 So they are there are many different types of files in Linux. 17 00:01:05,740 --> 00:01:11,110 So as we explained in the previous example, we have the D, which is the directory and dash, which 18 00:01:11,110 --> 00:01:15,070 is the text file, and we have here the device file and block and so on. 19 00:01:16,030 --> 00:01:21,130 So here is really important also to know about the symbolic link represented by L. 20 00:01:23,350 --> 00:01:32,230 So in Linux we have permission sets and those permission sets we they represent each file or each directory 21 00:01:32,230 --> 00:01:33,640 that we create in the system. 22 00:01:34,630 --> 00:01:38,950 So, for example, here, the permission says that we have we have the read and write and execute. 23 00:01:38,950 --> 00:01:44,530 So the read represents or the sign of the character with R and the right, we have the W and execute, 24 00:01:44,560 --> 00:01:50,890 we have the X and the value WI is very important to know about the value of each of these permissions. 25 00:01:50,890 --> 00:01:56,140 So for example, the R and the permission value is a number for a right. 26 00:01:56,950 --> 00:02:00,670 And the value of the permission of the permission. 27 00:02:00,760 --> 00:02:01,500 Right. 28 00:02:01,510 --> 00:02:03,100 It's to and execute. 29 00:02:03,100 --> 00:02:06,030 Here we have the value number one. 30 00:02:06,040 --> 00:02:11,680 So if we don't have any permission or like anything that on the file. 31 00:02:11,680 --> 00:02:14,800 So it represent by the dash and the value is zero. 32 00:02:16,460 --> 00:02:17,490 See here. 33 00:02:17,490 --> 00:02:18,590 Here's an example. 34 00:02:18,590 --> 00:02:20,690 We have number four. 35 00:02:20,720 --> 00:02:27,500 As we explained in the previous example, we have the read permission and we have the two for the write 36 00:02:27,500 --> 00:02:29,840 permission and X, which is execute. 37 00:02:29,870 --> 00:02:30,950 We have the value. 38 00:02:30,950 --> 00:02:31,670 It's one. 39 00:02:31,670 --> 00:02:34,130 And if there is no permission, this is zero. 40 00:02:36,550 --> 00:02:42,760 Is very important to know about the difference when we assign the permission sets either to a directory 41 00:02:42,760 --> 00:02:43,690 or a file. 42 00:02:44,200 --> 00:02:45,910 If we want to access. 43 00:02:46,800 --> 00:02:50,900 A directory and this directory has a read permission. 44 00:02:50,910 --> 00:02:56,250 We can view a list the content of the directory when we run the command ls. 45 00:02:56,580 --> 00:03:02,580 If we want to access a file and we have the read permission, we can copy the file and view the content 46 00:03:02,860 --> 00:03:03,840 of the file. 47 00:03:04,570 --> 00:03:07,030 If we have the right permission. 48 00:03:07,030 --> 00:03:13,840 If you would like to access a directory, we can modify or rename, create and remove the directory 49 00:03:14,140 --> 00:03:20,590 content for the file, we can modify the content of the file. 50 00:03:20,650 --> 00:03:28,570 If we have an execute permission for accessing the file, we can run CD command in order to access the 51 00:03:28,570 --> 00:03:29,410 directory. 52 00:03:30,010 --> 00:03:36,130 If we have an execute permission to access the file, we can execute a random file, for example a shell 53 00:03:36,130 --> 00:03:37,150 or bash script. 54 00:03:37,150 --> 00:03:42,280 In order to run file, we need we need both a read permission. 55 00:03:42,870 --> 00:03:44,400 And execute permission. 56 00:03:44,400 --> 00:03:47,040 This is for the bash and script files. 57 00:03:47,040 --> 00:03:53,580 So as we said that before, if there is no permission or there is no deny, so we represent Y with the 58 00:03:53,580 --> 00:03:54,120 dash. 59 00:03:54,150 --> 00:03:55,670 Thus concludes our session. 60 00:03:55,680 --> 00:03:57,450 Thank you and see you in the next lesson.