wrong date with NFS

outstripp

Registered
We have iMac computers in classrooms, and they are running as an NFS client. We have found that the wrong access time (atime) is created by Mac OS 10.5 and 10.6.

A file that is opened by using O_CREATE on the NFS-mounted directory will have the wrong atime. For example, the year will appear as 1920, 1970, or 2037 depending on the IP address of the NFS client.

This problem can also be found with Solaris NFS server and EMC Celerra.

The following program will create a file having the wrong atime on an NFS-mounted directory:
-------------------
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>

main() {

int fd;

/* O_EXCL option will cause wrong atime */
fd = open("AIZU", O_CREAT | O_EXCL | O_RDWR, 0644);
/* fd = open("AIZU", O_CREAT | O_RDWR, 0644); */
close(fd);
exit(0);
}
-------------------

The phenomenon is quite similar to the following problems on FreeBSD reported in 2001:
http://www.mail-archive.com/freebsd-stable@freebsd.org/msg22084.html

If anyone knows a solution to this problem, we would greatly appreciate your advice. Thanks in advance.
 
That stands to reason, because Mac OS X is FreeBSD. Most all of the bugs in FreeBSD will also be present in Mac OS X.

Have you submitted a bug report to Apple?
 
First make sure you aren't leaving .DS_Store files (this is a Finder file to remember a snap show of how the content are laid out). Use this Terminal command given by Apple document called Mac OS X v10.4 and later: How to prevent .DS_Store file creation over network connections. Plus does the blog question/answer called Setting file creation date in Mac OS X help at all?

One more thing I use TinkerTool instead to save of so much typing in OS X to modify system files along with The System Preference pane called Secrets.
 
Back
Top