OPEN
Share Support in NFS Version 4
The NFS Version 4 protocol provides several file-sharing modes that the client can use to control file access by other clients. A client can specify the following:
-
DENY_NONE
mode permits other clients read and write access to a file. -
DENY_READ
mode denies other clients read access to a file. -
DENY_WRITE
mode denies other clients write access to a file. -
DENY_BOTH
mode denies other clients read and write access to a file.
The Oracle Solaris NFS Version 4 server fully implements these file-sharing modes. Therefore, if a client attempts to open a file in a way that conflicts with the current share mode, the server denies the attempt by failing the operation. When such attempts fail with the initiation of the open or create operations, the NFS Version 4 client receives a protocol error. This error is mapped to the application error EACCES
.
Even though the protocol provides several sharing modes, the open operation in Oracle Solaris does not offer multiple sharing modes. When opening a file, an Oracle Solaris NFS Version 4 client can only use the DENY_NONE
mode.
Note:
Even though thefcntl
system call has an F_SHARE
command to control file sharing, the fcntl
commands cannot be implemented correctly with NFS Version 4. If you use these fcntl
commands on an NFS Version 4 client, the client returns the EAGAIN
error to the application.