Previous section.

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


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;


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

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

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

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

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.

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

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

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