From the exports(5) man page, in the "User ID Mapping" section, it says:
User ID Mapping
...
Very often, it is not desirable that the root user on a client machine is also treated as root when accessing files on the NFS server. To this end, uid 0 is normally mapped to a different id: the so-called anonymous or
nobody
uid. This mode of operation (called `root squashing') is the default, and can be turned off withno_root_squash
....
Here's the complete list of mapping options:
- root_squash
- Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive, such as user
bin
or groupstaff
.
- no_root_squash
- Turn off root squashing. This option is mainly useful for diskless clients.
- all_squash
- Map all uids and gids to the anonymous user. Useful for NFS-exported public FTP directories, news spool directories, etc. The opposite option is
no_all_squash
, which is the default setting....
I summarized the UID mapping options in the following table (assumed 1000
to be the UID of a non-privileged user, and 65534
to be the anonymous UID):
Option | Client UID | Server UID |
---|---|---|
root_squash | 0 | 65534 |
root_squash | 1000 | 1000 |
no_root_squash | 0 | 0 |
no_root_squash | 1000 | 1000 |
all_squash | 0 | 65534 |
all_squash | 1000 | 65534 |
no_all_squash | 0 | 0 (unsure) |
no_all_squash | 1000 | 65534 (unsure) |
Question
- Is my summary for the
no_all_squash
option correct? If yes, when will it be useful? - Which option is the default? The paragraph above says
root_squash
, whileno_all_squash
claims itself default in the options explanation.
Thank you in advance!