Previous section.

Protocols for Interworking: XNFS, Version 3W
Copyright © 1998 The Open Group

Name

NFSPROC_SETATTR - Set File Attributes

Call Arguments

struct sattrargs { fhandle file; sattr attributes; };

fhandle and sattr are defined in Basic Data Types .

Return Arguments

union attrstat switch (stat status) { case NFS_OK: fattr attributes; default: void; };

fattr and sattr are defined in Basic Data Types .

RPC Procedure Description

attrstat NFSPROC_SETATTR (sattrargs) = 2;

Description

The attributes argument contains fields which are either 0xffffffff or are the new value for the attributes of file. If the reply status is NFS_OK, then the reply attributes have the attributes of the file after the NFSPROC_SETATTR operation has completed. The file handle supplied to this procedure can refer to any of the supported file types, but it may not be possible to set all attributes in the sattr structure for a particular file type.

Setting the size field to zero in the sattr structure means the server will truncate the file. This operation should only be permitted on regular files.

Return Codes

NFS_OK
Indicates that the call completed successfully and the results are valid.

NFSERR_PERM
Not owner. The caller does not have the correct ownership to perform the requested operation.

NFSERR_IO
Some sort of hard error occurred when the operation was in progress. This could be a disk error, for example.

NFSERR_ACCES
Permission denied. The caller does not have the correct permission to perform the requested operation, or is attempting to change an attribute which can not be modified for a particular file type.

NFSERR_ISDIR
Is a directory. The caller specified a directory in a non-directory operation.

NFSERR_ROFS
Read-only file system. Write attempted on a read-only file system.

NFSERR_STALE
The fhandle given in the arguments was invalid. That is, the file referred to by that file handle no longer exists, or access to it has been revoked.


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index