User Tools

Site Tools


os_cp:users_permissions

Differences

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

Link to this comparison view

Next revision
Previous revision
os_cp:users_permissions [2023/04/02 11:10]
jkonczak utworzono
os_cp:users_permissions [2025/03/31 14:30] (current)
jkonczak
Line 4: Line 4:
 A user is identified by a numerical __u__ser __id__entifier – **uid**. Uids are mapped to usernames. A user is identified by a numerical __u__ser __id__entifier – **uid**. Uids are mapped to usernames.
 \\ \\
-A group is identified by a numerical __g__roup __id__entifier – **uid**, that are likewise mapped to group names.+A group is identified by a numerical __g__roup __id__entifier – **gid**, that are likewise mapped to group names.
  
 A user must be in one primary group and can be in multiple supplementary groups. A user must be in one primary group and can be in multiple supplementary groups.
Line 30: Line 30:
 <​html></​small></​html>​ <​html></​small></​html>​
  
-The user whose uid equals **0** is referred to as **superuser**. Traditional username of the superuser is **[[https://​pl.wikipedia.org/​wiki/​Root|root]]**.+The user whose uid equals **0** is referred to as **superuser**. Traditional username of the superuser is **[[https://​en.wikipedia.org/​wiki/​Superuser|root]]**.
  
 To check who you are, you can run the ''​**whoami**''​ command. \\ To check who you are, you can run the ''​**whoami**''​ command. \\
Line 65: Line 65:
 <​html><​small></​html>​ <​html><​small></​html>​
   ​   ​
 +++++ Examples: | {{section>​so:​users_chmod:​examples-en#​id&​inline&​noheader}} ++++
 +
 ==== [extra] Logged on users, logon history, messaging others ==== ==== [extra] Logged on users, logon history, messaging others ====
  
Line 98: Line 100:
  
 <​html></​small></​html>​ <​html></​small></​html>​
 +
 +++++ Examples: | {{section>​so:​users_chmod:​examples-en#​who&​inline&​noheader}} ++++
  
 ==== Switching to another user ==== ==== Switching to another user ====
Line 119: Line 123:
  
 <​html></​small></​html>​ <​html></​small></​html>​
 +
 +++++ Examples: | {{section>​so:​users_chmod:​examples-en#​su&​inline&​noheader}} ++++
  
 ===== File permissions ===== ===== File permissions =====
Line 129: Line 135:
 \\ \\
 <​small>​Additionally,​ there are three other special permissions:​ set-user-id (suid, __**s**__), set-group-id (sgid, __**s**__) and sticky (__**t**__).</​small>​ <​small>​Additionally,​ there are three other special permissions:​ set-user-id (suid, __**s**__), set-group-id (sgid, __**s**__) and sticky (__**t**__).</​small>​
 +
 +Upon file access, when the file belongs to the current user, only user's permissions are considered.\\
 +If the file does not belong to the user but the user belongs to the file's group, only group'​s permissions are considered.\\
 +If the file does not belong to the user and the user does not belong to the file's group, only others'​ permission are considered.\\
 +<​small>​Note that if a file has read permission for the group but no read permission for the user, then the owner cannot display the file even if the owner belongs to the file's group.</​small>​
  
 The execute mode for files stands for running them (e.g., as a program or a script), for directories – entering it. The execute mode for files stands for running them (e.g., as a program or a script), for directories – entering it.
Line 256: Line 267:
  
 </​small>​ </​small>​
 +
 +<​html><​style>​.wrap_nomargin{margin:​0} .wrap_nomargin p{margin:​0}</​style></​html>​
 +<WRAP nomargin>​
 +Examples:
 +++++ umask | {{section>​so:​users_chmod:​examples-en#​umask&​inline&​noheader}} ++++
 +++++ manipulating mode bits | {{section>​so:​users_chmod:​examples-en#​chmod&​inline&​noheader}} ++++
 +++++ user, group or others | {{section>​so:​users_chmod:​examples-en#​ugo&​inline&​noheader}} ++++
 +++++ write-only and read-only files | {{section>​so:​users_chmod:​examples-en#​write_only&​inline&​noheader}} ++++
 +++++ creating/​removing directory entries | {{section>​so:​users_chmod:​examples-en#​dir_create_remove&​inline&​noheader}} ++++
 +</​WRAP>​
 +++++ suid and sgid | {{section>​so:​users_chmod:​examples-en#​suid_sgid&​inline&​noheader}} ++++
 +
  
 ===== Change, modify and access date ===== ===== Change, modify and access date =====
Line 280: Line 303:
  
 <​html></​small></​html>​ <​html></​small></​html>​
 +
 +++++ Examples: | {{section>​so:​users_chmod:​examples-en#​touch&​inline&​noheader}} ++++
  
  
os_cp/users_permissions.1680426650.txt.gz · Last modified: 2023/04/02 11:10 by jkonczak