Subject: UNCHECKED mode and permission bits

From: Mike Eisler <[email-masked]>
Date: Thu, 18 Jan 2001 15:02:46 -0800 (PST)

All RFCs for all three NFS versions say that when a file is created in
non-exclusive, non-guarded mode (and in NFSv2, that's the only way to
create a file) that attributes are applied to file if it exists.

I find it hard to beleive that NFS servers actually modify permission
bits  or the group, or the ACL. Nor do I believe that's what is
intended. Certainly, my simple experiments with the creat() system call
against local files on UNIX platforms supports my disbelief.

Looking at the Solaris NFS server code, or more correctly, the code for
the create interface to the ufs filesystem, it does not appear that it
implements to the NFSv2 and NFSv3 RFCs in this regard.  But I think the
RFCs are wrong, as is the NFSv4 RFC. If I understand things correctly,
in practice, only the size attribute in a non-exclusive CREATE gets
applied to the existing file. Since the NFSv4 RFC will be
replaced, it might be good to clarify this, since I doubt NFSv4 servers
will comply with current RFC.

	-mre

---

From: "Kendrick M. Smith" <[email-masked]>
Date: Thu, 18 Jan 2001 21:50:38 -0500 (EST)

> will comply with current RFC.

doesn't the spec already say this?  from p. 144 of the draft7 spec,

"When an UNCHECKED create encounters an existing file, the
 attributes specified by createattrs is not used, except that when
 an object_size of zero is specified, the existing file is
 truncated."

- k

---

From: Uresh Vahalia <[email-masked]>
Date: Thu, 18 Jan 2001 23:59:32 -0500

That is different from Kendrick's statement and, I believe, from current
practice in v2/v3.  If a non-zero file size is specified in an unchecked
create for an existing file, I believe many of today's servers would truncate
the file to the specified size.  YMMV.