User Tools

Site Tools


so:users_chmod:examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
so:users_chmod:examples [2025/03/25 12:58] – utworzono jkonczakso:users_chmod:examples [2026/03/16 10:32] (current) – [su] jkonczak
Line 46: Line 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>
  
Line 385: Line 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&#64;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&#64;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&#64;host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> touch -d &apos;2025-01-03 12:34&apos; essay.odt
 +<span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user&#64;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&#64;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&#64;host</span><span style="font-weight:bold;color:#5c5cff;"> ~ $</span> touch -a -d &apos;yesterday 6pm&apos; essay.odt
 +<span style="font-weight:bold;color:#7f7f7f;"></span><span style="font-weight:bold;color:#00ff00;">user&#64;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&#64;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&#64;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&#64;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&#64;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&#64;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>
  
so/users_chmod/examples.1742907503.txt.gz · Last modified: (external edit)