Różnice między wybraną wersją a wersją aktualną.
| Nowa wersja | Poprzednia wersja | ||
|
so:users_chmod:examples [2025/03/25 13:58] jkonczak utworzono |
so:users_chmod:examples [2026/03/16 11:32] (aktualna) jkonczak [su] |
||
|---|---|---|---|
| Linia 46: | Linia 46: | ||
| </pre> | </pre> | ||
| Zwróć uwagę, że każde wywołanie <code>su</code>, <code>newgrp</code>, etc. uruchamia nowy proces (domyślnie powłoki). | Zwróć uwagę, że każde wywołanie <code>su</code>, <code>newgrp</code>, etc. uruchamia nowy proces (domyślnie powłoki). | ||
| + | <br> | ||
| + | <small>Zauważ też że programy <code>su</code> i <code>sg</code> są uruchamiane jako root, co będzie wyjaśnione później w tym temacie.</small> | ||
| </html> | </html> | ||
| Linia 385: | Linia 387: | ||
| -rw-r--r-- 1 daemon users 6 Jan 04 12:06 <span style="color:#00cd00;">prog-suid.txt</span> | -rw-r--r-- 1 daemon users 6 Jan 04 12:06 <span style="color:#00cd00;">prog-suid.txt</span> | ||
| </pre> | </pre> | ||
| + | </html> | ||
| + | |||
| + | ==== touch ==== | ||
| + | |||
| + | <html> | ||
| + | <pre style="line-height:100%; margin:0"> | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> stat essay.odt | ||
| + | File: essay.odt | ||
| + | Size: 73414 Blocks: 144 IO Block: 4096 regular file | ||
| + | Device: 254,3 Inode: 15466607 Links: 1 | ||
| + | Access: (0644/-rw-r--r--) Uid: ( 1005/ user) Gid: ( 100/ users) | ||
| + | Access: 2025-01-02 12:00:00.000000000 +0100 | ||
| + | Modify: 2025-01-01 12:00:00.000000000 +0100 | ||
| + | Change: 2025-01-02 12:00:00.000000000 +0100 | ||
| + | Birth: 2025-01-01 12:00:00.000000000 +0100 | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> ls -l essay.odt | ||
| + | -rw-r--r-- 1 user users 73414 Jan 1 12:00 essay.odt | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> touch -d '2025-01-03 12:34' essay.odt | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> stat essay.odt | ||
| + | File: essay.odt | ||
| + | Size: 73414 Blocks: 144 IO Block: 4096 regular file | ||
| + | Device: 254,3 Inode: 15466607 Links: 1 | ||
| + | Access: (0644/-rw-r--r--) Uid: ( 1005/ user) Gid: ( 100/ users) | ||
| + | Access: 2025-01-03 12:34:00.000000000 +0100 | ||
| + | Modify: 2025-01-03 12:34:00.000000000 +0100 | ||
| + | Change: 2025-01-05 12:00:00.000000000 +0100 | ||
| + | Birth: 2025-01-01 12:00:00.000000000 +0100 | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> ls -l essay.odt | ||
| + | -rw-r--r-- 1 user users 73414 Jan 3 12:34 essay.odt | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> touch -a -d 'yesterday 6pm' essay.odt | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> stat essay.odt | ||
| + | File: essay.odt | ||
| + | Size: 73414 Blocks: 144 IO Block: 4096 regular file | ||
| + | Device: 254,3 Inode: 15466607 Links: 1 | ||
| + | Access: (0644/-rw-r--r--) Uid: ( 1005/ user) Gid: ( 100/ users) | ||
| + | Access: 2025-01-04 18:00:00.000000000 +0100 | ||
| + | Modify: 2025-01-03 12:34:00.000000000 +0100 | ||
| + | Change: 2025-01-05 12:00:00.000000000 +0100 | ||
| + | Birth: 2025-01-01 12:00:00.000000000 +0100 | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> ls -l essay.odt | ||
| + | -rw-r--r-- 1 user users 73414 Jan 3 12:34 essay.odt | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> date | ||
| + | Sun Jan 5 12:00:00 CET 2025 | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> touch essay.odt | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> stat essay.odt | ||
| + | File: essay.odt | ||
| + | Size: 73414 Blocks: 144 IO Block: 4096 regular file | ||
| + | Device: 254,3 Inode: 15466607 Links: 1 | ||
| + | Access: (0644/-rw-r--r--) Uid: ( 1005/ user) Gid: ( 100/ users) | ||
| + | Access: 2025-01-05 12:00:00.000000000 +0100 | ||
| + | Modify: 2025-01-05 12:00:00.000000000 +0100 | ||
| + | Change: 2025-01-05 12:00:00.000000000 +0100 | ||
| + | Birth: 2025-01-01 12:00:00.000000000 +0100 | ||
| + | <span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user@host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> ls -l essay.odt | ||
| + | -rw-r--r-- 1 user users 73414 Jan 5 12:01 essay.odt | ||
| + | </pre> | ||
| + | Zwróć uwagę, że data zmiany metadanych pliku jest ustawiana na bieżącą przy każdej zmianie metadanych, w tym zmianie dat. | ||
| </html> | </html> | ||