summaryrefslogtreecommitdiffstats
path: root/man7/path_resolution.7
diff options
context:
space:
mode:
Diffstat (limited to 'man7/path_resolution.7')
-rw-r--r--man7/path_resolution.740
1 files changed, 20 insertions, 20 deletions
diff --git a/man7/path_resolution.7 b/man7/path_resolution.7
index 07c5a8d74..79ce4b545 100644
--- a/man7/path_resolution.7
+++ b/man7/path_resolution.7
@@ -14,16 +14,16 @@ directory is the root directory of the calling process.
A process inherits its root directory from its parent.
Usually this will be the root directory of the file hierarchy.
A process may get a different root directory by use of the
-.BR chroot (2)
+.MR chroot 2
system call, or may temporarily use a different root directory by using
-.BR openat2 (2)
+.MR openat2 2
with the
.B RESOLVE_IN_ROOT
flag set.
.P
A process may get an entirely private mount namespace in case
it\[em]or one of its ancestors\[em]was started by an invocation of the
-.BR clone (2)
+.MR clone 2
system call that had the
.B CLONE_NEWNS
flag set.
@@ -32,7 +32,7 @@ This handles the \[aq]/\[aq] part of the pathname.
If the pathname does not start with the \[aq]/\[aq] character, the starting
lookup directory of the resolution process is the current working directory of
the process \[em] or in the case of
-.BR openat (2)-style
+.MR openat 2 -style
system calls, the
.I dfd
argument (or the current working directory if
@@ -42,7 +42,7 @@ is passed as the
argument).
The current working directory is inherited from the parent, and can
be changed by use of the
-.BR chdir (2)
+.MR chdir 2
system call.
.P
Pathnames starting with a \[aq]/\[aq] character are called absolute pathnames.
@@ -116,7 +116,7 @@ so that the only limit that remains is the maximum of 40
resolutions for the entire pathname.
.P
The resolution of symbolic links during this stage can be blocked by using
-.BR openat2 (2),
+.MR openat2 2 ,
with the
.B RESOLVE_NO_SYMLINKS
flag set.
@@ -154,7 +154,7 @@ the parent directory of "path",
outside of the filesystem hierarchy on "dev".
.P
Traversal of mount points can be blocked by using
-.BR openat2 (2),
+.MR openat2 2 ,
with the
.B RESOLVE_NO_XDEV
flag set (though note that this also restricts bind mount traversal).
@@ -170,10 +170,10 @@ If the last component of a pathname is a symbolic link, then it
depends on the system call whether the file referred to will be
the symbolic link or the result of path resolution on its contents.
For example, the system call
-.BR lstat (2)
+.MR lstat 2
will operate on the symbolic link,
while
-.BR stat (2)
+.MR stat 2
operates on the file pointed to by the symbolic link.
.SS Length limit
There is a maximum length for pathnames.
@@ -191,16 +191,16 @@ Linux returns
in this case.
.SS Permissions
The permission bits of a file consist of three groups of three bits; see
-.BR chmod (1)
+.MR chmod 1
and
-.BR stat (2).
+.MR stat 2 .
The first group of three is used when the effective user ID of
the calling process equals the owner ID of the file.
The second group
of three is used when the group ID of the file either equals the
effective group ID of the calling process, or is one of the
supplementary group IDs of the calling process (as set by
-.BR setgroups (2)).
+.MR setgroups 2 ).
When neither holds, the third group is used.
.P
Of the three bits used, the first bit determines read permission,
@@ -210,7 +210,7 @@ in case of ordinary files, or search permission in case of directories.
Linux uses the fsuid instead of the effective user ID in permission checks.
Ordinarily the fsuid will equal the effective user ID, but the fsuid can be
changed by the system call
-.BR setfsuid (2).
+.MR setfsuid 2 .
.P
(Here "fsuid" stands for something like "filesystem user ID".
The concept was required for the implementation of a user space
@@ -218,12 +218,12 @@ NFS server at a time when processes could send a signal to a process
with the same effective user ID.
It is obsolete now.
Nobody should use
-.BR setfsuid (2).)
+.MR setfsuid 2 .)
.P
Similarly, Linux uses the fsgid ("filesystem group ID")
instead of the effective group ID.
See
-.BR setfsgid (2).
+.MR setfsgid 2 .
.\" FIXME . say something about filesystem mounted read-only ?
.SS Bypassing permission checks: superuser and capabilities
On a traditional UNIX system, the superuser
@@ -238,7 +238,7 @@ when accessing files.
.\" of the file's execute permission bits. -- MTK (Oct 05)
.P
On Linux, superuser privileges are divided into capabilities (see
-.BR capabilities (7)).
+.MR capabilities 7 ).
Two capabilities are relevant for file permissions checks:
.B CAP_DAC_OVERRIDE
and
@@ -258,7 +258,7 @@ on directories, and read permission on ordinary files.
.\" FIXME . say something about immutable files
.\" FIXME . say something about ACLs
.SH SEE ALSO
-.BR readlink (2),
-.BR capabilities (7),
-.BR credentials (7),
-.BR symlink (7)
+.MR readlink 2 ,
+.MR capabilities 7 ,
+.MR credentials 7 ,
+.MR symlink 7