Intro to Linux | Cisco Lab17 | Ownerships and Permissions

Опубликовано: 28 Сентябрь 2024
на канале: Computer Engineering
564
27

00:00 17.1: Introduction
* View and understand permissions on files and directories.
* Use the chmod command to change permissions.
* Change ownerships with the chown and chgrp commands.

00:31 17.2: File Permissions
* Working in the /tmp directory (as an example).
* Using mkdir to make two directories on the same line.
* Using touch to make two files.
* Using ls -l to check over directories.
* Checking file ownership.
* Noting the first character of the file for file type.
* Noting the next 3 characters are user owner's permissions. The next 3 characters are group owner's permissions. The last three characters are everyone else's permissions.
* Refresher on the ls -la.

05:31 17.2.4: Using the chmod command (symbolic notation)
* chmod can change or remove permissions. See notes bellow for full list of commands.
* Syntax: chmod [u/g/o][+/-][r/w/x] [directory].

10:42 17.2.6: Using the chmod command to change permissions of multiple files at the same time (symbolic notation)
* chmod can change or remove permissions of multiples files at the same time. See notes bellow for full list of commands.
* Syntax: chmod [u/g/o][+/-][r/w/x],[u/g/o][+/-][r/w/x]... [directory]/[directory]....

13:00 17.2.7: Granting ALL users the same read and write permissions
* Syntax: Syntax: chmod [a][=][r/w/x] [directory].

14:20 17.2.8: Moving a command to a file (call back)
* Syntax: echo "[command]" } [file name].
* To execute files we need to have the "x" (execute) permission.
* Only a user owner of a file or root user can change permissions of a file.

16:41 17.2.8: Using the chmod command (numeric notation)
* Read (r) is 4.
* Write (w) is 2.
* Execute (x) is1.
* A total is calculated for each ownership (user/ group/ or others).

18:25 17.2.11: Using the stat command
* This command displays more detailed information about a file.
* Syntax: stat [file name].

19:21 Using chmod with numeric notation

20:02 17.3: File Ownership
* Differences between chown command and chgrp command.
* chown command can only be used by the root user. We use the su command to login to the root user.
* Changing user and group ownership.
* Using the -R option (recursive) with the chgrp command to change ownership of all files in a directory structure.


Pre-Lab:    • Intro to Linux | Cisco pre-lab 17 | O...  


NOTES: https://docs.google.com/document/d/1G...