Quick NFS options reference

  toucheatout  2006-08-08 16:34  Linux  

From troubleshooters.com

Generic options for uid mashing

Those are for /etc/exports.

Option

What it does

Comment

root_squash
Convert incoming requests from user root to the anonymous
uid and gid.
This is the default.
no_root_squash
Negation of root_squash

anonuid Set anonymous user id to a specific id
The id is a number, not a name. This number can be
obtained by this command on the server:

grep myself /etc/passwd

Where myself is the username whose uid you want to find.

anongid Set anonymous group id to a specific id The id is a number, not a name. This number can be
obtained by this command on the server:

grep myself /etc/group

Where myself is the name of the group whose uid you want to find.

all_squash
Convert incoming requests, from ALL users, to the
anonymous uid and gid.
Remember that this gives all incoming users the same
set of rights to the share. This may not be what you want.

Export and mount options

Tip: to optimize heavily-accessed files, disable atime on the filesystem, and if only used for pure data, also specify nosuid,noexec,nodev just in case.

Option

Action

Default?

Comment

Negation

option

async All I/O done asynchronously
Y
Better performance, more possiblity of corruption
when things crash. Do not use when the same file is being modified by different
users.
sync
sync All I/O done synchronously N
Less likelihood of corruption, less likelihood of
overwrite by other users.
async
dirsync All I/O to directories done synchronously
N


atime Update inode access time for each  access.
Y

noatime
auto Automatic mounting.
Y
Can be mounted with the -a option. Mounted at boot
time.
noauto
defaults Shorthand for default options.

rw,suid,dev,exec,auto,nouser,async.


dev Device
Y
Interpret character or block special devices on the 
file system.
nodev
exec Permit execution of binaries.
Y

noexec
_netdev Device requires network.

The  device holding the filesystem requires network
access. Do not mount until the network has been enabled.

remount Remount a mounted system.

Used to change the mount flags, especially to toggle
between rw and ro.


ro Allow only read access.
N
Used to protect the mounted filesystem from writes.
Even if the filesystem is writeable by the user, and is exported writeable,
this still protects it.
rw
rw Allow both read and write.
Y
Allow writing to the filesystem, assuming that the
system is writeable by the user and has been exported writeable.
ro
suid Allow set-user-identifier and/or set-group-identifier
bits to take effect.
Y


nosuid
user Allow mounting by ordinary user.

N
When used in /etc/fstab, this allows mounting
by an ordinary user. Only the user performing the mount can unmount it.
nouser
users
Allow mounting and dismounting by arbitrary user. N
When used in /etc/fstab, this allows mounting
by an ordinary user. Any user can unmount it at any time, regardless of who
initially mounted it.

So what goes in fstab and what's determined in /etc/exports is yours to distinguish...

 
Informatics


yro.slashdot.org - Your Rights online


nytimes.com New York Times - International


Informatic headlines