Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| elearning:workbooks:debian:11:sec:l101 [2025/11/22 09:32] – créée admin | elearning:workbooks:debian:11:sec:l101 [2025/12/02 15:12] (Version actuelle) – admin | ||
|---|---|---|---|
| Ligne 9: | Ligne 9: | ||
| =====Contenu du Module===== | =====Contenu du Module===== | ||
| - | * **LDF503 | + | * **LDF401 |
| * Contenu du Module | * Contenu du Module | ||
| * Présentation | * Présentation | ||
| Ligne 29: | Ligne 29: | ||
| * 3.1 - Les ACL | * 3.1 - Les ACL | ||
| * 3.2 - Les Attributs Étendus | * 3.2 - Les Attributs Étendus | ||
| + | |||
| =====Présentation===== | =====Présentation===== | ||
| Ligne 42: | Ligne 43: | ||
| < | < | ||
| - | root@debian11: | + | trainee@debian12:~$ touch tux.jpg |
| - | logout | + | |
| - | + | ||
| - | trainee@debian11: | + | |
| - | / | + | |
| - | + | ||
| - | trainee@debian11:~$ touch tux.jpg | + | |
| - | trainee@debian11:~$ ls -l | grep tux.jpg | + | trainee@debian12:~$ ls -l | grep tux.jpg |
| - | -rw-r--r-- 1 trainee | + | -rw-r--r-- 1 trainee |
| </ | </ | ||
| Ligne 107: | Ligne 102: | ||
| < | < | ||
| - | trainee@debian11:~$ chmod o+w tux.jpg | + | trainee@debian12:~$ chmod o+w tux.jpg |
| - | trainee@debian11:~$ ls -l | grep tux.jpg | + | trainee@debian12:~$ ls -l | grep tux.jpg |
| - | -rw-r--rw- 1 trainee | + | -rw-r--rw- 1 trainee |
| </ | </ | ||
| Ligne 116: | Ligne 111: | ||
| < | < | ||
| - | trainee@debian11:~$ chmod ug-w tux.jpg | + | trainee@debian12:~$ chmod ug-w tux.jpg |
| - | trainee@debian11:~$ ls -l | grep tux.jpg | + | trainee@debian12:~$ ls -l | grep tux.jpg |
| - | -r--r--rw- 1 trainee | + | -r--r--rw- 1 trainee |
| </ | </ | ||
| Ligne 143: | Ligne 138: | ||
| < | < | ||
| - | trainee@debian11:~$ chmod 644 tux.jpg | + | trainee@debian12:~$ chmod 644 tux.jpg |
| - | trainee@debian11:~$ ls -l | grep tux.jpg | + | trainee@debian12:~$ ls -l | grep tux.jpg |
| - | -rw-r--r-- 1 trainee | + | -rw-r--r-- 1 trainee |
| </ | </ | ||
| Ligne 158: | Ligne 153: | ||
| < | < | ||
| - | trainee@debian11:~$ chmod --help | + | trainee@debian12:~$ chmod --help |
| Usage: chmod [OPTION]... MODE[, | Usage: chmod [OPTION]... MODE[, | ||
| or: chmod [OPTION]... OCTAL-MODE FILE... | or: chmod [OPTION]... OCTAL-MODE FILE... | ||
| Ligne 172: | Ligne 167: | ||
| --reference=RFILE | --reference=RFILE | ||
| -R, --recursive | -R, --recursive | ||
| - | --help | + | --help |
| - | --version | + | --version |
| Each MODE is of the form ' | Each MODE is of the form ' | ||
| Ligne 189: | Ligne 184: | ||
| < | < | ||
| - | trainee@debian11:~$ umask | + | trainee@debian12:~$ umask |
| 0022 | 0022 | ||
| - | trainee@debian11:~$ su - | + | |
| - | Password: | + | trainee@debian12:~$ su - |
| - | root@debian11:~# umask | + | Password: |
| + | |||
| + | root@debian12:~# umask | ||
| 0022 | 0022 | ||
| - | root@debian11:~# exit | + | |
| + | root@debian12:~# exit | ||
| logout | logout | ||
| </ | </ | ||
| Ligne 215: | Ligne 213: | ||
| < | < | ||
| - | trainee@debian11:~$ umask 044 | + | trainee@debian12:~$ umask 044 |
| - | trainee@debian11:~$ touch tux1.jpg | + | trainee@debian12:~$ touch tux1.jpg |
| - | trainee@debian11:~$ ls -l | grep tux1.jpg | + | trainee@debian12:~$ ls -l | grep tux1.jpg |
| - | -rw--w--w- 1 trainee | + | -rw--w--w- 1 trainee |
| - | trainee@debian11:~$ umask 022 | + | trainee@debian12:~$ umask 022 |
| - | trainee@debian11:~$ umask | + | trainee@debian12:~$ umask |
| 0022 | 0022 | ||
| </ | </ | ||
| Ligne 231: | Ligne 229: | ||
| < | < | ||
| - | trainee@debian11:~$ help umask | + | trainee@debian12:~$ help umask |
| umask: umask [-p] [-S] [mode] | umask: umask [-p] [-S] [mode] | ||
| Display or set file mode mask. | Display or set file mode mask. | ||
| Ligne 260: | Ligne 258: | ||
| < | < | ||
| - | trainee@debian11:~$ su - | + | trainee@debian12:~$ su - |
| Password: fenestros | Password: fenestros | ||
| - | root@debian11:~# cd / | + | root@debian12:~# cd / |
| - | root@debian11:/ | + | root@debian12:/ |
| - | root@debian11:/ | + | root@debian12:/ |
| - | -rw-r--r-- 1 root | + | -rw-r--r-- 1 root |
| </ | </ | ||
| Ligne 274: | Ligne 272: | ||
| < | < | ||
| - | root@debian11:/ | + | root@debian12:/ |
| Usage: chown [OPTION]... [OWNER][: | Usage: chown [OPTION]... [OWNER][: | ||
| or: chown [OPTION]... --reference=RFILE FILE... | or: chown [OPTION]... --reference=RFILE FILE... | ||
| Ligne 309: | Ligne 307: | ||
| -P do not traverse any symbolic links (default) | -P do not traverse any symbolic links (default) | ||
| - | --help | + | --help |
| - | --version | + | --version |
| Owner is unchanged if missing. | Owner is unchanged if missing. | ||
| Ligne 331: | Ligne 329: | ||
| < | < | ||
| - | root@debian11:/ | + | root@debian12:/ |
| - | root@debian11:/ | + | root@debian12:/ |
| - | -rw-r--r-- 1 root root | + | -rw-r--r-- 1 root root |
| </ | </ | ||
| Ligne 344: | Ligne 342: | ||
| < | < | ||
| - | root@debian11:/ | + | root@debian12:/ |
| Usage: chgrp [OPTION]... GROUP FILE... | Usage: chgrp [OPTION]... GROUP FILE... | ||
| or: chgrp [OPTION]... --reference=RFILE FILE... | or: chgrp [OPTION]... --reference=RFILE FILE... | ||
| Ligne 374: | Ligne 372: | ||
| -P do not traverse any symbolic links (default) | -P do not traverse any symbolic links (default) | ||
| - | --help | + | --help |
| - | --version | + | --version |
| Examples: | Examples: | ||
| Ligne 393: | Ligne 391: | ||
| < | < | ||
| - | root@debian11:/ | + | root@debian12:/ |
| - | -rw-r--r-- 1 root root 2146 Jun 5 13:01 /etc/passwd | + | -rw-r----- 1 root shadow |
| - | -rwsr-xr-x 1 root root 63960 Feb | + | -rwsr-xr-x 1 root root 68248 Apr |
| </ | </ | ||
| Ligne 405: | Ligne 403: | ||
| Quand le SUID bit est placé sur un programme, l’utilisateur qui lance ce programme se voit affecté le numéro d’utilisateur du propriétaire de ce programme et ce pour la durée de son exécution. | Quand le SUID bit est placé sur un programme, l’utilisateur qui lance ce programme se voit affecté le numéro d’utilisateur du propriétaire de ce programme et ce pour la durée de son exécution. | ||
| - | Dans le cas du changement de mot de passe, chaque utilisateur qui lance le programme / | + | Dans le cas du changement de mot de passe, chaque utilisateur qui lance le programme / |
| La même fonction existe pour le groupe à l’aide du SGID bit. | La même fonction existe pour le groupe à l’aide du SGID bit. | ||
| Ligne 422: | Ligne 420: | ||
| < | < | ||
| - | root@debian11:/ | + | root@debian12:/ |
| - | find: ‘/proc/27625/task/27625/ | + | find: ‘/proc/1675/task/1675/ |
| - | find: ‘/proc/27625/ | + | find: ‘/proc/1675/ |
| /usr/bin/su | /usr/bin/su | ||
| - | / | ||
| / | / | ||
| / | / | ||
| + | / | ||
| / | / | ||
| / | / | ||
| Ligne 436: | Ligne 434: | ||
| / | / | ||
| / | / | ||
| - | / | ||
| / | / | ||
| / | / | ||
| - | / | ||
| / | / | ||
| / | / | ||
| / | / | ||
| - | / | ||
| / | / | ||
| - | / | ||
| / | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| / | / | ||
| / | / | ||
| + | / | ||
| / | / | ||
| / | / | ||
| Ligne 461: | Ligne 463: | ||
| < | < | ||
| - | root@debian11:/ | + | root@debian12:/ |
| - | root@debian11:/tmp# mkdir inherit | + | root@debian12:/tmp# mkdir inherit |
| - | root@debian11:/tmp# chown root: | + | root@debian12:/tmp# chown root: |
| - | root@debian11:/tmp# chmod g+s inherit | + | root@debian12:/tmp# chmod g+s inherit |
| - | root@debian11:/tmp# touch inherit/ | + | root@debian12:/tmp# touch inherit/ |
| - | root@debian11:/tmp# mkdir inherit/ | + | root@debian12:/tmp# mkdir inherit/ |
| - | root@debian11:/tmp# cd inherit; ls -l | + | root@debian12:/tmp# cd inherit; ls -l |
| total 4 | total 4 | ||
| - | drwxr-sr-x 2 root trainee 4096 Jun 5 17:16 testrep | + | drwxr-sr-x 2 root trainee 4096 Nov 25 15:09 testrep |
| - | -rw-r--r-- 1 root trainee | + | -rw-r--r-- 1 root trainee |
| </ | </ | ||
| Ligne 496: | Ligne 498: | ||
| < | < | ||
| - | root@debian11:/ | + | root@debian12:/ |
| - | root@debian11:/tmp# ls -l | grep repertoire_public | + | |
| - | drwxr-xr-t 2 root root | + | root@debian12:/tmp# ls -l | grep repertoire_public |
| + | drwxr-xr-t 2 root root 4096 Nov 25 15:10 repertoire_public | ||
| </ | </ | ||
| Ligne 510: | Ligne 513: | ||
| < | < | ||
| - | root@debian11:/tmp# getfacl / | + | root@debian12:/tmp# getfacl / |
| getfacl: Removing leading '/' | getfacl: Removing leading '/' | ||
| # file: home/ | # file: home/ | ||
| Ligne 523: | Ligne 526: | ||
| < | < | ||
| - | root@debian11:/tmp# setfacl --set u:: | + | root@debian12:/tmp# setfacl --set u:: |
| - | root@debian11:/tmp# getfacl / | + | root@debian12:/tmp# getfacl / |
| getfacl: Removing leading '/' | getfacl: Removing leading '/' | ||
| # file: home/ | # file: home/ | ||
| Ligne 544: | Ligne 547: | ||
| < | < | ||
| - | root@debian11:/tmp# mkdir / | + | root@debian12:/tmp# mkdir / |
| </ | </ | ||
| Ligne 550: | Ligne 553: | ||
| < | < | ||
| - | root@debian11:/tmp# setfacl --set d: | + | root@debian12:/tmp# setfacl --set d: |
| </ | </ | ||
| Ligne 558: | Ligne 561: | ||
| < | < | ||
| - | root@debian11:/tmp# touch / | + | root@debian12:/tmp# touch / |
| </ | </ | ||
| Ligne 564: | Ligne 567: | ||
| < | < | ||
| - | root@debian11:/tmp# getfacl / | + | root@debian12:/tmp# getfacl / |
| getfacl: Removing leading '/' | getfacl: Removing leading '/' | ||
| # file: home/ | # file: home/ | ||
| Ligne 576: | Ligne 579: | ||
| default: | default: | ||
| - | root@debian11:/tmp# getfacl / | + | root@debian12:/tmp# getfacl / |
| getfacl: Removing leading '/' | getfacl: Removing leading '/' | ||
| # file: home/ | # file: home/ | ||
| Ligne 591: | Ligne 594: | ||
| < | < | ||
| - | root@debian11:/tmp# cd / | + | root@debian12:/tmp# cd / |
| - | root@debian11:/ | + | root@debian12:/ |
| - | root@debian11:/ | + | root@debian12:/ |
| # file: . | # file: . | ||
| # owner: root | # owner: root | ||
| Ligne 614: | Ligne 617: | ||
| < | < | ||
| - | root@debian11:/ | + | root@debian12:/ |
| - | getfacl 2.2.53 -- get file access control lists | + | getfacl 2.3.1 -- get file access control lists |
| Usage: getfacl [-aceEsRLPtpndvh] file ... | Usage: getfacl [-aceEsRLPtpndvh] file ... | ||
| - | -a, --access | + | -a, --access |
| -d, --default | -d, --default | ||
| -c, --omit-header | -c, --omit-header | ||
| Ligne 628: | Ligne 631: | ||
| -t, --tabular | -t, --tabular | ||
| -n, --numeric | -n, --numeric | ||
| + | --one-file-system | ||
| -p, --absolute-names | -p, --absolute-names | ||
| -v, --version | -v, --version | ||
| Ligne 636: | Ligne 640: | ||
| < | < | ||
| - | root@debian11:/ | + | root@debian12:/ |
| - | setfacl 2.2.53 -- set file access control lists | + | setfacl 2.3.1 -- set file access control lists |
| Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ... | Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ... | ||
| -m, --modify=acl | -m, --modify=acl | ||
| Ligne 686: | Ligne 690: | ||
| < | < | ||
| - | root@debian11:/ | + | root@debian12:/ |
| - | root@debian11:~# mkdir -p attributs/ | + | root@debian12:~# mkdir -p attributs/ |
| </ | </ | ||
| Ligne 694: | Ligne 698: | ||
| < | < | ||
| - | root@debian11:~# touch attributs/ | + | root@debian12:~# touch attributs/ |
| - | root@debian11:~# touch attributs/ | + | root@debian12:~# touch attributs/ |
| </ | </ | ||
| Ligne 702: | Ligne 706: | ||
| < | < | ||
| - | root@debian11:~# chattr +i -R attributs/ | + | root@debian12:~# chattr +i -R attributs/ |
| </ | </ | ||
| Ligne 708: | Ligne 712: | ||
| < | < | ||
| - | root@debian11:~# lsattr -R attributs | + | root@debian12:~# lsattr -R attributs |
| ----i---------e------- attributs/ | ----i---------e------- attributs/ | ||
| Ligne 724: | Ligne 728: | ||
| < | < | ||
| - | root@debian11:~# cd attributs; mv / | + | root@debian12:~# cd attributs; mv / |
| mv: cannot move '/ | mv: cannot move '/ | ||
| </ | </ | ||