Skip to content

Commit

Permalink
Merge branch 'PR/fstab-space-notes' of https://github.com/karelzak/ut…
Browse files Browse the repository at this point in the history
…il-linux-work

* 'PR/fstab-space-notes' of https://github.com/karelzak/util-linux-work:
  fstab.5 mount.8: add note about field separator
  • Loading branch information
karelzak committed Jan 3, 2025
2 parents b6b8bf3 + 52dc926 commit 5a295e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion sys-utils/fstab.5.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ The file *fstab* contains descriptive information about the filesystems the syst
The file is not read by *mount*(8) only but often is used by many other tools and daemons, and proper functionality may require additional steps. For example, on systemd-based systems, it's recommended to use *systemctl daemon-reload* after *fstab* modification.
Each filesystem is described on a separate line. Fields on each line are separated by tabs or spaces. Lines starting with '#' are comments. Blank lines are ignored.
Each filesystem is described on a separate line, with fields separated by tabs or spaces. The line is split into fields before being parsed. This means that any spaces or tabs within the fields must be escaped using \040 or \011, even within quoted strings (e.g. LABEL="foo\040bar").
Lines starting with '#' are comments. Blank lines are ignored.
The following is a typical example of an *fstab* entry:
Expand Down
3 changes: 2 additions & 1 deletion sys-utils/mount.8.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,8 @@ The __id-mount__ parameter indicates the starting ID in the new mount.
The __id-host__ parameter indicates the starting ID in the filesystem.
The __id-range__ parameter indicates how many IDs are to be mapped.
It is possible to specify multiple ID-mappings.
The individual ID-mappings must be separated by spaces.
+
The individual ID mappings must be separated by spaces. Please note that in the __/etc/fstab__ file, spaces are interpreted as separators between fields. To avoid this, you must escape them using \040. For example, X-mount.idmap=0:0:1\040500:1000:1.
+
For example, the ID-mapping *X-mount.idmap=u:1000:0:1 g:1001:1:2 5000:1000:2* creates an idmapped mount where
UID 0 is mapped to UID 1000, GID 1 is mapped to GUID 1001, GID 2 is mapped to GID 1002, UID and GID 1000 are mapped to 5000, and UID and GID 1001 are mapped to 5001 in the mount.
Expand Down

0 comments on commit 5a295e9

Please sign in to comment.