<< Previous Page: Export NFS4 File System
nfs4-acl-tools package manages particular directories and files. It includes:
- nfs4-getfacl: List all access controls for specified file or directory
- nfs4-setfacl: Create access controls for a directory or a file
- nfs4-editfacl: To edit or change the access controls. It invokes nfs_setfacl -e option and opens an editor.
An ACL entry
- It begins with an entry type, such as accept or deny entry (A or D),
- followed by ACL flag to specify group or inheritance capability
- and then principal to which ACL is applied
- and finally the list of access options like r for read and w for write
- (r,w,x): read, write and execute permissions
- (t,n) read
- (T,N) write
- C: allows user to change access controls
- y: enables read and write synchronization
- d: delete files and directories
- D: for subdirectories
- a: append data and create sub-directories
- rtncy: all read options
- wadDTNC: write options
- x: execute
Special URLs OWNER@, GROUP@, and EVERYONE@ correspond to the owner, group and other access used on standard permission
Use the mount command to mount the NFSv4 file system explicitly or by creating an entry in the /etc/fstab file.
$ mount -t nfs4 wap.ananova.com:/ /home/ananova/wap mount -t nfs4 -o soft,intr,timeo=20 wap.ananova.com:/ /home/ananova/wap
Unmount NFS directory with the unmount command
unmount /home/ananova/wap unmount wap.ananova.com:/
An NFS entry in the /etc/fstab consists of hostname, followed by pathname of the directory, where it is mounted, separated by a colon.
host:/home/ananova home/ananova nfs options 0 0
- rsize=n: The number of bytes NFS uses when reading files from an NFS server. The default is 1024 bytes, while the size of 8192 greatly improves performance.
- wsize=n: The number of bytes NFS uses when writing files to an NFS server.
- timeo=n: The value in tenths of a second before sending the first retransmission after a timeout. The default value is seven-tenths of a second.
- retry=n: The number of minutes to retry an NFS mount operation before giving up. The default is 10,000 minutes (one week)
- retrans=n: The number of retransmission or minor timeouts for an NFS mount operation before a major timeout. The default is 3. At that time, the connection canceled or a “server not responding” message is displayed
- soft: Mount system using soft mount
- hard: Mount system using hard mount. It is the default.
- intr: Allows NFS to interrupt the file operation and return to the calling program. The default is not to allow file operations to be interrupted.
- bg: If the first mount attempt times out continue trying the mount in the background. The default is to fall without backgrounding.
- tcp: Mounts the NFS file system using the TCP protocol, instead of the default UDP protocol
Automount service autofs configured using the master file /etc/auto.master to list map files. The master file lists the root pathnames where the file systems mounted along with a map file for each of those pathnames.
Mac OS X for Macintosh supports NFS for file sharing.