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.
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.