bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cp --preserve=mode not right on rh4 and nfs


From: Warren L Dodge
Subject: cp --preserve=mode not right on rh4 and nfs
Date: Fri, 3 Oct 2008 12:40:21 -0700

I have built coreutils-6.12 on a GNU/Linux RedHat3 system. When I use
the "cp" command with the --preserve=mode,timestamps switch there is a
problem where a copy to a nfs mounted file system does not set the
timesamp properly.

I show examples below where I run the command on GNU/Linux RedHat3 and it
works as expected. Then I run the same binary on GNU/Linux RedHat4 and
it does not work properly.

I believe I reported this quite some time ago. I was hoping the problem
was solved in coreutils-6.12 as some of the users are needing this
functionality. 

The /tmp on my machine is the local drive. The installed_tree/bin is
where I am executing the command. The installed_tree is a nfs mounted
file system. It is served by a NetApp system.



coreutils-6.12 built on gnu/linux RedHat3

#############################################################################
execute on GNU/Linux RedHat4

./cp --preserve=mode,timestamps --no-preserve=ownership yes z
./cp --preserve=mode,timestamps --no-preserve=ownership yes /tmp/z
./cp --preserve=mode,timestamps --no-preserve=ownership /tmp/z zz
./cp --preserve=mode,timestamps --no-preserve=ownership /tmp/z /tmp/zz

ll yes /tmp/z /tmp/zz z zz

-rwxr-xr-x  1 wdtmgr wdtmgr 73211 Oct  3 12:02 yes
-rwxr-xr-x  1 wdtmgr wdtmgr 73211 Oct  3 12:02 /tmp/z
-rwxr-xr-x  1 wdtmgr wdtmgr 73211 Oct  3 12:02 /tmp/zz
-rwxr-xr-x  1 wdtmgr wdtmgr 73211 Oct  3 12:07 z         << WRONG TIME
-rwxr-xr-x  1 wdtmgr wdtmgr 73211 Oct  3 12:08 zz        << WRONG TIME

#############################################################################

execute on GNU/Linux RedHat3

./cp --preserve=mode,timestamps --no-preserve=ownership yes y
./cp --preserve=mode,timestamps --no-preserve=ownership yes /tmp/y
./cp --preserve=mode,timestamps --no-preserve=ownership /tmp/y yy
./cp --preserve=mode,timestamps --no-preserve=ownership /tmp/y /tmp/yy

ll yes /tmp/y /tmp/yy y yy
-rwxr-xr-x    1 wdtmgr   wdtmgr      73211 Oct  3 12:02 /tmp/y
-rwxr-xr-x    1 wdtmgr   wdtmgr      73211 Oct  3 12:02 /tmp/yy
-rwxr-xr-x    1 wdtmgr   wdtmgr      73211 Oct  3 12:02 y
-rwxr-xr-x    1 wdtmgr   wdtmgr      73211 Oct  3 12:02 yes
-rwxr-xr-x    1 wdtmgr   wdtmgr      73211 Oct  3 12:02 yy

#############################################################################





reply via email to

[Prev in Thread] Current Thread [Next in Thread]