<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="sv">
	<id>https://wiki.linux.se/index.php?action=history&amp;feed=atom&amp;title=credentials%287%29</id>
	<title>credentials(7) - Versionshistorik</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.linux.se/index.php?action=history&amp;feed=atom&amp;title=credentials%287%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.linux.se/index.php?title=credentials(7)&amp;action=history"/>
	<updated>2026-05-27T04:06:53Z</updated>
	<subtitle>Versionshistorik för denna sida på wikin</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://wiki.linux.se/index.php?title=credentials(7)&amp;diff=6246&amp;oldid=prev</id>
		<title>Admin: Skapade sidan med &#039;= credentials(7) — Linux Manual Page =  == NAME == &#039;&#039;&#039;credentials&#039;&#039;&#039; - process identifiers  == DESCRIPTION == === Process ID (PID) === Each process has a unique nonnegative integer identifier that is assigned when the process is created using fork(2). A process can obtain its PID using getpid(2). A PID is represented using the type `pid_t` (defined in `&lt;sys/types.h&gt;`).  PIDs are used in a range of system calls to identify the process affected by the call, for e...&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.linux.se/index.php?title=credentials(7)&amp;diff=6246&amp;oldid=prev"/>
		<updated>2024-11-25T07:29:06Z</updated>

		<summary type="html">&lt;p&gt;Skapade sidan med &amp;#039;= credentials(7) — Linux Manual Page =  == NAME == &amp;#039;&amp;#039;&amp;#039;credentials&amp;#039;&amp;#039;&amp;#039; - process identifiers  == DESCRIPTION == === Process ID (PID) === Each process has a unique nonnegative integer identifier that is assigned when the process is created using &lt;a href=&quot;/index.php?title=fork(2)&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;fork(2) (sidan existerar inte)&quot;&gt;fork(2)&lt;/a&gt;. A process can obtain its PID using &lt;a href=&quot;/index.php?title=getpid(2)&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;getpid(2) (sidan existerar inte)&quot;&gt;getpid(2)&lt;/a&gt;. A PID is represented using the type `pid_t` (defined in `&amp;lt;sys/types.h&amp;gt;`).  PIDs are used in a range of system calls to identify the process affected by the call, for e...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Ny sida&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= credentials(7) — Linux Manual Page =&lt;br /&gt;
&lt;br /&gt;
== NAME ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;credentials&amp;#039;&amp;#039;&amp;#039; - process identifiers&lt;br /&gt;
&lt;br /&gt;
== DESCRIPTION ==&lt;br /&gt;
=== Process ID (PID) ===&lt;br /&gt;
Each process has a unique nonnegative integer identifier that is assigned when the process is created using [[fork(2)]]. A process can obtain its PID using [[getpid(2)]]. A PID is represented using the type `pid_t` (defined in `&amp;lt;sys/types.h&amp;gt;`).&lt;br /&gt;
&lt;br /&gt;
PIDs are used in a range of system calls to identify the process affected by the call, for example: [[kill(2)]], [[ptrace(2)]], [[setpriority(2)]], [[setpgid(2)]], [[setsid(2)]], [[sigqueue(3)]], and [[waitpid(2)]].&lt;br /&gt;
&lt;br /&gt;
A process&amp;#039;s PID is preserved across an [[execve(2)]].&lt;br /&gt;
&lt;br /&gt;
=== Parent process ID (PPID) ===&lt;br /&gt;
A process&amp;#039;s parent process ID identifies the process that created this process using [[fork(2)]]. A process can obtain its PPID using [[getppid(2)]]. A PPID is represented using the type `pid_t`.&lt;br /&gt;
&lt;br /&gt;
A process&amp;#039;s PPID is preserved across an [[execve(2)]].&lt;br /&gt;
&lt;br /&gt;
=== Process group ID and session ID ===&lt;br /&gt;
Each process has a session ID and a process group ID, both represented using the type `pid_t`. A process can obtain its session ID using [[getsid(2)]], and its process group ID using [[getpgrp(2)]].&lt;br /&gt;
&lt;br /&gt;
A child created by [[fork(2)]] inherits its parent&amp;#039;s session ID and process group ID. A process&amp;#039;s session ID and process group ID are preserved across an [[execve(2)]].&lt;br /&gt;
&lt;br /&gt;
Sessions and process groups are abstractions devised to support shell job control. A process group (sometimes called a &amp;quot;job&amp;quot;) is a collection of processes that share the same process group ID; the shell creates a new process group for the process(es) used to execute single command or pipeline (e.g., the two processes created to execute the command `&amp;quot;ls | wc&amp;quot;` are placed in the same process group). A process&amp;#039;s group membership can be set using [[setpgid(2)]]. The process whose process ID is the same as its process group ID is the process group leader for that group.&lt;br /&gt;
&lt;br /&gt;
A session is a collection of processes that share the same session ID. All of the members of a process group also have the same session ID. A new session is created when a process calls [[setsid(2)]], which creates a new session whose session ID is the same as the PID of the process that called it. The creator of the session is called the session leader.&lt;br /&gt;
&lt;br /&gt;
All of the processes in a session share a controlling terminal. The controlling terminal is established when the session leader first opens a terminal (unless the `O_NOCTTY` flag is specified when calling [[open(2)]]). A terminal may be the controlling terminal of at most one session.&lt;br /&gt;
&lt;br /&gt;
At most one of the jobs in a session may be the foreground job; other jobs in the session are background jobs. Only the foreground job may read from the terminal. Various system calls and library functions may operate on all members of a process group, including [[kill(2)]], [[killpg(3)]], [[getpriority(2)]], [[setpriority(2)]], and [[waitpid(2)]].&lt;br /&gt;
&lt;br /&gt;
=== User and group identifiers ===&lt;br /&gt;
Each process has various associated user and group IDs, represented using the types `uid_t` and `gid_t` (defined in `&amp;lt;sys/types.h&amp;gt;`).&lt;br /&gt;
&lt;br /&gt;
On Linux, each process has:&lt;br /&gt;
* **Real user ID and real group ID**: Determine ownership of the process. Obtainable via [[getuid(2)]] and [[getgid(2)]].&lt;br /&gt;
* **Effective user ID and effective group ID**: Used to determine permissions for accessing shared resources. Obtainable via [[geteuid(2)]] and [[getegid(2)]].&lt;br /&gt;
* **Saved set-user-ID and saved set-group-ID**: Used in set-user-ID and set-group-ID programs.&lt;br /&gt;
* **Filesystem user ID and filesystem group ID**: Used to determine file-access permissions; see [[path_resolution(7)]].&lt;br /&gt;
* **Supplementary group IDs**: A set of additional group IDs used for permission checks. Obtainable via [[getgroups(2)]].&lt;br /&gt;
&lt;br /&gt;
A child created by [[fork(2)]] inherits copies of its parent&amp;#039;s user and group IDs. During an [[execve(2)]], the effective and saved set IDs may be changed, as described in [[execve(2)]].&lt;br /&gt;
&lt;br /&gt;
=== Modifying process user and group IDs ===&lt;br /&gt;
Processes can modify user and group IDs using APIs like:&lt;br /&gt;
* [[setuid(2)]] and [[setgid(2)]]&lt;br /&gt;
* [[seteuid(2)]] and [[setegid(2)]]&lt;br /&gt;
* [[setfsuid(2)]] and [[setfsgid(2)]]&lt;br /&gt;
* [[setreuid(2)]] and [[setregid(2)]]&lt;br /&gt;
* [[setresuid(2)]] and [[setresgid(2)]]&lt;br /&gt;
* [[setgroups(2)]]&lt;br /&gt;
&lt;br /&gt;
Changes to a process&amp;#039;s effective user or group ID can affect its capabilities, as described in [[capabilities(7)]].&lt;br /&gt;
&lt;br /&gt;
== STANDARDS ==&lt;br /&gt;
Process IDs, parent process IDs, process group IDs, and session IDs are specified in POSIX.1. The real, effective, and saved set user and group IDs, and the supplementary group IDs, are also specified in POSIX.1. The filesystem user and group IDs are a Linux extension.&lt;br /&gt;
&lt;br /&gt;
== NOTES ==&lt;br /&gt;
Various fields in the `/proc/pid/status` file show the process credentials. See [[proc(5)]] for further information.&lt;br /&gt;
&lt;br /&gt;
The POSIX threads specification requires credentials to be shared by all threads in a process. However, Linux maintains separate credentials for each thread at the kernel level.&lt;br /&gt;
&lt;br /&gt;
== SEE ALSO ==&lt;br /&gt;
[[bash(1)]], [[csh(1)]], [[id(1)]], [[ps(1)]], [[setuid(2)]], [[setgid(2)]], [[setgroups(2)]], [[setresuid(2)]], [[setresgid(2)]], [[capabilities(7)]], [[pid_namespaces(7)]], [[user_namespaces(7)]]&lt;br /&gt;
&lt;br /&gt;
== COLOPHON ==&lt;br /&gt;
This page is part of the Linux man-pages project. For bug reports or improvements, visit [https://www.kernel.org/doc/man-pages/].&lt;br /&gt;
= Sidslut =&lt;br /&gt;
&lt;br /&gt;
Orginalhemsidan på Engelska :https://man7.org/linux/man-pages/man7/capabilities.7.html&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
Det här är en maskinöversättning av Linux man sidor till svenska. Om du hittar fel är vi tacksamma om du rapporterar dem via formuläret som finns på &lt;br /&gt;
https://www.linux.se/kontaka-linux-se/&lt;br /&gt;
&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;Tack till [https://datorhjalp.se Datorhjälp] som har  sponsrat [https://www.linux.se Linux.se] med webbhotell.&lt;br /&gt;
&lt;br /&gt;
[[Kategori:Övrig Informationsmanual]]&lt;br /&gt;
[[Kategori:Linuxmanual]]&lt;br /&gt;
&lt;br /&gt;
= Sidslut =&lt;br /&gt;
&lt;br /&gt;
Orginalhemsidan på Engelska := Sidslut =&lt;br /&gt;
&lt;br /&gt;
Orginalhemsidan på Engelska :https://man7.org/linux/man-pages/man7/capabilities.7.html&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
Det här är en maskinöversättning av Linux man sidor till svenska. Om du hittar fel är vi tacksamma om du rapporterar dem via formuläret som finns på &lt;br /&gt;
https://www.linux.se/kontaka-linux-se/&lt;br /&gt;
&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;Tack till [https://datorhjalp.se Datorhjälp] som har  sponsrat [https://www.linux.se Linux.se] med webbhotell.&lt;br /&gt;
&lt;br /&gt;
[[Kategori:Övrig Informationsmanual]]&lt;br /&gt;
[[Kategori:Linuxmanual]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
Det här är en maskinöversättning av Linux man sidor till svenska. Om du hittar fel är vi tacksamma om du rapporterar dem via formuläret som finns på &lt;br /&gt;
https://www.linux.se/kontaka-linux-se/&lt;br /&gt;
&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;Tack till [https://datorhjalp.se Datorhjälp] som har  sponsrat [https://www.linux.se Linux.se] med webbhotell.&lt;br /&gt;
&lt;br /&gt;
[[Kategori:Övrig Informationsmanual]]&lt;br /&gt;
[[Kategori:Linuxmanual]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>