This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Maybe 1.5 Regression: cp failing while working with cygwin 1.3.22
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 15 Jan 2008 15:03:40 +0100
- Subject: Re: Maybe 1.5 Regression: cp failing while working with cygwin 1.3.22
- References: <478CA52E.8050609@onevision.de>
- Reply-to: cygwin at cygwin dot com
On Jan 15 13:21, Roland Schwingel wrote:
> Receipe to reproduce:
>
> 1. Login to your linux box in your homeaccount.
> 2. mkdir -p ~/tmp/test
> 3. cd ~/tmp/test
> 4. mkdir subdir
> 5. ln -s subdir symlink
> 6. logout
> 7. Start cygwin 1.3.22
> 8. cp -rp //server/share/path/to/your/home/tmp/test /tmp
> 9. <everything fine>
> 10. Start cygwin 1.5 installation
> 11. cp -rp //server/share/path/to/your/home/tmp/test /tmp
> 12. Error message appears:
>
> cp: will not create hard link: '/tmp/test/symlink' to directory
> '/tmp/test/subdir'
>
> Obviously cygwin 1.5 is now detecting the symlink correctly while 1.3 was
> not because it copied
> the symlinked folder as folder not as link (even when I did cp -a).
Here's the reason:
Cygwin 1.5.25 uses the i-node numbers returned by
Samba > 3.x as ... i-node numbers. Cygwin 1.3.x generated always pseudo
i-node numbers on remote drives.
When listing the files on Linux, the i-node numbers are different:
linux$ ls -li
total 4
233804 drwxr-xr-x 2 corinna users 4096 Jan 15 14:46 subdir
233805 lrwxrwxrwx 1 corinna users 6 Jan 15 14:47 symlink -> subdir
cygwin-1.5.25$ ls -li
total 0
8808978157900 drwxr-xr-x 1 corinna root 0 Jan 15 14:46 subdir
8808978157900 drwxr-xr-x 1 corinna root 0 Jan 15 14:46 symlink
Usually the i-node numbers returned by Samba are the device id in the
high dword and the actual i-node number in the low d-word:
233804 == 0x000000000003914C
233805 == 0x000000000003914D
8808978157900 == 0x000010060003914C
I have no idea why Samba doesn't return the correct i-node number for
symlinks. This is most unfortunate.
Maybe the smb.conf setting "follow symlinks = no" is an option for you?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/