Subject: Possible fileutils regression in debian 4

From: "G.P. Walker BEng (Hons) MIET EngTech" <[email-masked]>
Date: Sun, 29 Apr 2007 17:38:18 +0100 (GMT+01:00)

Package: coreutils
Version: 5.97-5.3

Copying a file to a windows share mounted using the kernel cifs module 
in debian 4 causes the date stamps not to be preserved using cp -p , cp 
-a, cp --preserve=all . Under woody, this behaviour was not seen, and 
the date stamps were correctly preserved when requested.

In conducting some research into this problem, I discovered this 
ubuntu bug report, however it relates to copy  via nfs not cifs. 
However the behaviour is identical to that I am now seeing with debian 
4.

https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.15
/+bug/57317

Sadly, it appears that it is not just debian 4 that suffers with this 
issue. I have tried a gentoo system and that too has this behaviour.

I don't know where the core issue lies. If the files are copied using 
ssh with switches to preserve dates, the files do preserve the dates. 
This leads me to believe the issue lies within the cp application or 
the fileutils/coreutils package.

Thanks for reading.

___________________________________________________________

Tiscali Broadband only £9.99 a month for your first 3 months! http://www.tiscali.co.uk/products/broadband/

---

From: [email-masked] (Bob Proulx)
Date: Sun, 29 Apr 2007 13:33:56 -0600

G.P. Walker BEng (Hons) MIET EngTech wrote:
> I don't know where the core issue lies.

Please try using 'strace' to trace the system calls and show the
results of them.

  strace -o cp-a.strace.out cp -a SRC DST

I believe the output of that should be sufficiently small and should
contain the information needed to determine where the problem exists.

> If the files are copied using ssh with switches to preserve dates,
> the files do preserve the dates.  This leads me to believe the issue
> lies within the cp application or the fileutils/coreutils package.

Interesting.  Given your present information I would agree.  But
because the libc and the kernel are both involved and both are also
different between the systems and because I have seen related issues
there I am suspicious of them.  There are multiple different ways to
obtain and set file timestamp information.  It is possible that scp is
using a different system call than cp and therefore different behavior
results.

Bob