This shows you the differences between two versions of the page.
|
so:users_chmod:which_perm_group-en [2026/03/17 14:08] jkonczak Translation page created |
so:users_chmod:which_perm_group-en [2026/03/17 14:09] (current) jkonczak |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== which_perm_group-en ====== | + | <html> |
| + | <style>.wU{font-weight:bold;color:#00ff00}.wH{color:#cdcd00}.wD{color:#0000ee} | ||
| + | .wP{margin:-2px; border: 2px solid red} | ||
| + | .wS{border-radius: 8px; margin:-2px; border: 2px solid red} | ||
| + | .wN{border-radius: 8px; margin:-2px; border: 2px solid #aaa; background: | ||
| + | linear-gradient(to left top, transparent 47%, #aaa 47%, #aaa 53%, transparent 53%)} | ||
| + | .wG{border-radius: 8px; margin:-2px; border: 2px solid #aaa; background: | ||
| + | linear-gradient(to right top, transparent 47%, #aaa 47%, #aaa 53%, transparent 53%)} | ||
| + | p{margin-top:0}pre{margin-bottom:0} | ||
| + | </style> | ||
| + | </html> | ||
| + | Keep in mind that programs such as ''ls'' or ''stat'' display the permissions | ||
| + | exactly the same regardless if the user that ran them is the owner or not, | ||
| + | belongs to the group whose the file is or not. One has to tell apart manually | ||
| + | which chunk of permissions to look at. | ||
| + | <html> | ||
| + | <pre> | ||
| + | <span class="wU">roo</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> whoami | ||
| + | <span class="wS">roo</span> | ||
| + | <span class="wU">roo</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> groups | ||
| + | bipedal jumping | ||
| + | <span class="wU">roo</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> ls -l | ||
| + | total 4 | ||
| + | d<span class="wP">rwx</span>r-x--x 5 <span class="wS">roo</span> jumping 160 Mar 16 20:04 myDir | ||
| + | -<span class="wP">rw-</span>---r-- 1 <span class="wS">roo</span> jumping 249 Mar 16 20:03 someFile | ||
| + | <span class="wU">roo</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> stat myDir | ||
| + | File: myDir | ||
| + | Size: 160 Blocks: 0 IO Block: 4096 directory | ||
| + | Device: 0,30 Inode: 90 Links: 5 | ||
| + | Access: (0<span class="wP">7</span>51/d<span class="wP">rwx</span>r-x--x) Uid: (1234/ <span class="wS">roo</span>) Gid: (123/ jumping) | ||
| + | <span class="wU">roo</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> stat someFile | ||
| + | File: someFile | ||
| + | Size: 249 Blocks: 8 IO Block: 4096 regular file | ||
| + | Device: 0,30 Inode: 91 Links: 1 | ||
| + | Access: (0<span class="wP">6</span>04/-<span class="wP">rw-</span>---r--) Uid: (1234/ <span class="wS">roo</span>) Gid: (123/ jumping) | ||
| + | </pre> | ||
| + | </html> | ||
| + | The user ''roo'' is the owner of the file, so for the user **only** the first chunk matters. | ||
| + | <html> | ||
| + | <pre> | ||
| + | <span class="wU">tigger</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> whoami | ||
| + | <span class="wN">tigger</span> | ||
| + | <span class="wU">tigger</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> groups | ||
| + | <span class="wS">jumping</span> happy | ||
| + | <span class="wU">tigger</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> ls -l | ||
| + | total 4 | ||
| + | drwx<span class="wP">r-x</span>--x 5 <span class="wN">roo</span> <span class="wS">jumping</span> 160 Mar 16 20:04 myDir | ||
| + | -rw-<span class="wP">---</span>r-- 1 <span class="wN">roo</span> <span class="wS">jumping</span> 249 Mar 16 20:03 someFile | ||
| + | <span class="wU">tigger</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> stat myDir | ||
| + | File: myDir | ||
| + | Size: 160 Blocks: 0 IO Block: 4096 directory | ||
| + | Device: 0,30 Inode: 90 Links: 5 | ||
| + | Access: (07<span class="wP">5</span>1/drwx<span class="wP">r-x</span>--x) Uid: (1234/ <span class="wN">roo</span>) Gid: (123/ <span class="wS">jumping</span>) | ||
| + | <span class="wU">tigger</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> stat someFile | ||
| + | File: someFile | ||
| + | Size: 249 Blocks: 8 IO Block: 4096 regular file | ||
| + | Device: 0,30 Inode: 91 Links: 1 | ||
| + | Access: (06<span class="wP">0</span>4/-rw-<span class="wP">---</span>r--) Uid: (1234/ <span class="wN">roo</span>) Gid: (123/ <span class="wS">jumping</span>) | ||
| + | </pre> | ||
| + | </html> | ||
| + | The user ''tigger'' is **not** the owner of the file, | ||
| + | but is in group ''jumping'' whose the file is, | ||
| + | so for the user **only** the middle chunk matters. | ||
| + | <html> | ||
| + | <pre> | ||
| + | <span class="wU">eeyore</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> whoami | ||
| + | <span class="wN">eeyore</span> | ||
| + | <span class="wU">eeyore</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> groups | ||
| + | <span class="wG">quadruped</span> <span class="wG">glum</span> | ||
| + | <span class="wU">eeyore</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> ls -l | ||
| + | total 4 | ||
| + | drwxr-x<span class="wP">--x</span> 5 <span class="wN">roo</span> <span class="wG">jumping</span> 160 Mar 16 20:04 myDir | ||
| + | -rw----<span class="wP">r--</span> 1 <span class="wN">roo</span> <span class="wG">jumping</span> 249 Mar 16 20:03 someFile | ||
| + | <span class="wU">eeyore</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> stat myDir | ||
| + | File: myDir | ||
| + | Size: 160 Blocks: 0 IO Block: 4096 directory | ||
| + | Device: 0,30 Inode: 90 Links: 5 | ||
| + | Access: (075<span class="wP">1</span>/drwxr-x<span class="wP">--x</span>) Uid: (1234/ <span class="wN">roo</span>) Gid: (123/ <span class="wG">jumping</span>) | ||
| + | <span class="wU">eeyore</span>@<span class="wH">host</span><span class="wD"> /tmp $</span> stat someFile | ||
| + | File: someFile | ||
| + | Size: 249 Blocks: 8 IO Block: 4096 regular file | ||
| + | Device: 0,30 Inode: 91 Links: 1 | ||
| + | Access: (060<span class="wP">4</span>/-rw----<span class="wP">r--</span>) Uid: (1234/ <span class="wN">roo</span>) Gid: (123/ <span class="wG">jumping</span>) | ||
| + | </pre> | ||
| + | </html> | ||
| + | The user ''eeyore'' is **not** the owner of the file, | ||
| + | **neither** he is in group ''jumping'' whose the file is, | ||
| + | so for the user **only** the last chunk matters. | ||