timestamp on symlink

jw schultz jw at pegasys.ws
Sun Jul 28 23:27:02 EST 2002


On Mon, Jul 29, 2002 at 12:40:56PM +1000, Martin Pool wrote:
> On 28 Jul 2002, Michael Wang <mwang at mindspring.com> wrote:
> > rsync does not sync the timestamp on symlink (Solaris 8).
> > 
> > It is probablly due to the limitation of Unix implementation
> > of symlink, but I would like to know why rsync/Unix does not
> > do this, and what we can do about it. Is the conclusion that
> > "rsync syncs everything except the timestamp on symlink"?
> 
> I don't think it is possible to set the time of a symbolic link.  A
> quick experiment on Linux seems to confirm that:

SUSv3 has lstat(2) for symlinks.
Linux adds lchown(2).

The SUSv3 manpage for utime(2) has no mention of symlink
behavior and there is no lutime().  My quick tests show that
utime updates the timestamp of the file and the link is
untouched.

In general rsync is hamstrung in terms of creating links
exactly as on the source, the timestamps cannot be set and
unless you use wrap link creation in setuid() calls the
owner will be the user running rsync.

[snip]

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt




More information about the rsync mailing list