X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 15 Jan 2008 15:03:40 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Maybe 1.5 Regression: cp failing while working with cygwin 1.3.22 Message-ID: <20080115140340.GF5097@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <478CA52E DOT 8050609 AT onevision DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <478CA52E.8050609@onevision.de> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list 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. > 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/