课程: Practical Linux for Network Engineers: Part 1

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Linux permissions, part 5: Relative permissions

Linux permissions, part 5: Relative permissions - Linux教程

课程: Practical Linux for Network Engineers: Part 1

Linux permissions, part 5: Relative permissions

- [Instructor] chmod can also be used in relative mode. So, let's grep for test3 here. Notice, other has read permissions. So, change mod other remove read permissions on file test3. Notice the difference here compared to that. Or let's add execute permissions to the group on file test3. Notice it was this. Now it's this. And again, for the user, let's remove execute permissions on file test3, and there you go. Execute permissions have been removed from the user. Now, you can add and remove permissions for everyone. So, for all, let's add execute permissions on file test3. Notice, execute, execute, execute. So, don't forget for chmod or change mode, you have all, user, group, and other, and then you can specify the permission, either taking it away with the minus or adding it with the plus, and then specifying the file or directory to make the changes on. So, this is an example of using relative permissions. So currently, that's what we've got. You could do more complex changes by…

内容