This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Strange symlink behaviour


Do symbolic links work over CIFS? I'm having a really strange problem with symlinks. Here is the story.

We have a small NAS box that is accessed via both NFS and CIFS. The former is needed for the actual production access of the files on the share, but the latter is used to update the contents of the share. That is, we need to access the files from Linux via NFS, but want to update the files on Windows via CIFS. The problem is that we need to create a symlink on the share, and to make it easier/possible to update the share from Windows we create a tar file that contains the three files we need:

  file_with_version_v1.0.3.abc
  file.abc ->  file_with_version_v1.0.3.abc
  other_file.def

If the share we want to populate with these files is empty, everything works fine. However, when we try to install the new release on top of an existing release, we run these commands:

  rn -fv //path/to/share/*
  tar xvf //path/to/temp/release.tar -C //path/to/share

If the new version is 1.0.4, I expect the following files in the share after running those commands:

  file_with_version_v1.0.4.abc
  file.abc ->  file_with_version_v1.0.4.abc
  other_file.def

But instead, we get this (when looked at via NFS):

  file_with_version_v1.0.4.abc
  file.abc ->  file_with_version_v1.0.3.abc
  file.abc.lnk
  other_file.def

Note that the link is pointing to the old file and there is a shortcut added to the directory. Upon further inspection, when we run the "rm -f //path/to/share/*" command the directory appears empty when checking it on Windows or via CIFS. However, when accessing it via NFS, I can still see the symlink. So when the tar file is untar'ed, the symlink does not get overwritten and a shortcut is created instead.

We are still running Cywin V1.5 on the manufacturing floor, and updating to V1.7 is not feasible at the moment. I think Cygwin uses some special tricks to get symlinks to work on Windows, but I don't quite understand how it works. Any ideas what may be going on?

Thanks,
Alfred


-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]