date and time created 92/07/11 09:21:16 by heideman
[unix-history] / usr / src / sbin / mount_umap / mount_umap.8
CommitLineData
63666ef6
JH
1.\"
2.\" Copyright (c) 1992 The Regents of the University of California
3.\" Copyright (c) 1990, 1992 Jan-Simon Pendry
4.\" All rights reserved.
5.\"
6.\" This code is derived from software donated to Berkeley by
7.\" Jan-Simon Pendry and from John Heidemann of the UCLA Ficus project.
8.\"
9.\"
10.\" %sccs.include.redist.roff%
11.\"
12.\" @(#)mount_umap.8 5.1 (Berkeley) %G%
13.\"
14.\"
15.Dd
16.Dt MOUNT_UMAP 8
17.Os BSD 4.4
18.Sh NAME
19.Nm mount_umap
20.Nd sample file system layer
21.Sh SYNOPSIS
22.Nm mount_umap
23.Op Fl F Ar fsoptions
24.Ar target mount-point uid-mapfile gid-mapfile
25.Sh DESCRIPTION
26The
27.Nm mount_umap
28command is used to mount a sub-tree of an existing file system
29that uses a different set of uids and gids than the local system.
30Such a file system could be mounted from a remote site via NFS or
31it could be a file system on removable media brought from some
32foreign location that uses a different password file and yellow pages.
33The
34.Nm mount_umap
35command uses a set of files provided by the user to make correspondences
36between uids and gids in the sub-tree's original environment and
37some other set of ids in the local environment. For instance, user
38smith might have uid 1000 in the original environment, while having
39uid 2000 in the local environment. The
40.Nm mount_umap
41command allows the subtree from smith's original environment to be
42mapped in such a way that all files with owning uid 1000 look like
43they are actually owned by uid 2000.
44.Pp
45The target should be the current location of the sub-tree in the
46local system's name space. The mount-point should be a directory
47where the mapped subtree is to be placed. The uid-mapfile and
48gid-mapfile describe the mappings to be made between identifiers.
49Briefly, the format of these files is a count of the number of
50mappings on the first line, with each subsequent line containing
51a single mapping. Each of these mappings consists of an id from
52the original environment and the corresponding id in the local environment,
53separated by white space. The uid-mapfile should contain all uid
54mappings, and the gid-mapfile should contain all gid mappings.
55Any uids not mapped in the uid-mapfile will be treated as user NOBODY,
56and any gids not mapped in the gid-mapfile will be treated as group
57NULLGROUP. At most 64 uids can be mapped for a given subtree, and
58at most 16 groups can be mapped by a given subtree.
59.Pp
60The mapfiles can be located anywhere in the file hierarchy, but they
61must be owned by root, and they must be writable only by root.
62.Nm mount_umap
63will refuse to map the sub-tree if the ownership or permissions on
64these files are improper. It will also balk if the count of mappings
65in the first line of the map files is not correct.
66.Pp
67The layer created by the
68.Nm mount_umap
69command is meant to serve as a simple example of file system layering.
70It is not meant for production use. The implementation is not very
71sophisticated, and not particularly fast.
72
73This command makes use of the layered file system, described
74command makes a sub-tree of an existing filesystem visible
75in another part of the global filesystem namespace,
76while also performing mappings of uids and gids.
77This allows existing files and directories to be accessed
78using a different pathname.
79.Pp
80Virtual file system sub-trees created by the null layer should
81be identical to those created by the loopback
82The virtual copy of a file system sub-tree created by the null
83layer should be nearly identical to one created by
84.Xr mount_lofs 8 .
85The purpose of the null layer is to serve as a basis for future
86layer development.
87.Pp
88An example of a layer constructed from the null layer is
89the umap layer (see
90.Xr mount_umap 8 ).
91.Sh SEE ALSO
92UCLA Technical Report CSD-910056,
93"Stackable Layers: an Architecture for File System Development".
94.Sh HISTORY
95The
96null file system layer
97is
98.Ud