[BusyBox 0000705]: Creating files on an NFS-mounted directory does not honor the current time when redirecting

bugs at busybox.net bugs at busybox.net
Tue Feb 14 07:41:50 UTC 2006


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=705 
====================================================================== 
Reported By:                Kent_Sandvik
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   705
Category:                   Documentation
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             02-08-2006 12:58 PST
Last Modified:              02-13-2006 23:41 PST
====================================================================== 
Summary:                    Creating files on an NFS-mounted directory does not
honor the current time when redirecting
Description: 
If you do this the time stamp of the system is not honored.

* Mount an NFS directory
* cd to this directory
* echo "foo" > new_file

Note that the time stamp of new_file is not the same as the current time.


====================================================================== 

---------------------------------------------------------------------- 
 landley - 02-13-06 23:41  
---------------------------------------------------------------------- 
Wait, you're seeing different behavior between "cat file > foo" and "echo
blah > foo"?  How does that work?  In both cases the file is created by
the > before the command to the left of it even gets _run_, so that
_can't_ distinguish between different command being run because the
command isn't run until afterwards.

In any case, the timestamp on a freshly created file is a function of the
operating system.  In the case of an NFS server, the creation time may be
the time according to the _server_, not the machine you have that
filesystem mounted on.  (Since the actual file creation operation is done
by the nfs server, not by the client.)  If those two are way out of sync
with each other, that's not busybox's problem.

Touch explicitly sets the file's time to the current system time via
utime(), so that'll set the time from the client's point of view even if
the server is off in la-la land.  But normal file creation just does an
open() and leaves time setting to the operating system.  If that isn't
setting the file's time right, that's not busybox's fault. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
02-08-06 12:58  Kent_Sandvik   New Issue                                    
02-08-06 12:58  Kent_Sandvik   Status                   new => assigned     
02-08-06 12:58  Kent_Sandvik   Assigned To               => BusyBox         
02-13-06 23:41  landley        Note Added: 0001090                          
======================================================================




More information about the busybox-cvs mailing list