delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:reply-to:subject:references:to:from:message-id | |
:date:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; q=dns; s=default; b=GqxbG2OPNaNMJaiB | |
V1BXUi+quk8Jqh2XX1qcCbPJ+L/P/8q5vDzMSwh/lv1ZjXG9+26mIGN3tI4exmJf | |
HLzNhY1ID8OOmsGFPsozuD4Gmq6AodTlGcz7HTgLnhZ/2/uIFuqRO05qdoAoomfn | |
kAyQxpXsR6NS/TWlq3fKpgQ4USg= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:reply-to:subject:references:to:from:message-id | |
:date:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; s=default; bh=5vweLnZ/z0dle7ajX4RAui | |
Acih4=; b=gOwbzYJRfPfs7I4U8+II/FQhvuOcFLgooV5PnJomfHe+hDIu4F8dL1 | |
PcoXL1XXzJKyBUYBfY7krJ2pvsowkznvRxO6PgvZ5ntoEtffOopCvXPCy7fXuJg3 | |
KelSyCC6TY6z1W5kMuGXymEOxgy0EAiH+3OpFqTSL70b8iRr70bF8= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=D*localhost, tonight, H*MI:sk:2016041 |
X-HELO: | csmail.cs.umass.edu |
Reply-To: | moss AT cs DOT umass DOT edu |
Subject: | Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316 |
References: | <20160413052257 DOT GB28803 AT mercury DOT ccil DOT org> <CA+Fg1xY46ANusM1MeZozkQ1u0+AHwd=vJDoWo7867az3wxPNBQ AT mail DOT gmail DOT com> <CACmJb3yHO_VhiDoyn33d+7R_rq8Bqco6VMuTdG622Bu2u52fHA AT mail DOT gmail DOT com> <20160413131128 DOT GA3162 AT mercury DOT ccil DOT org> |
To: | cygwin AT cygwin DOT com |
From: | Eliot Moss <moss AT cs DOT umass DOT edu> |
Message-ID: | <570E4B45.7000201@cs.umass.edu> |
Date: | Wed, 13 Apr 2016 09:36:05 -0400 |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
MIME-Version: | 1.0 |
In-Reply-To: | <20160413131128.GA3162@mercury.ccil.org> |
X-IsSubscribed: | yes |
On 4/13/2016 9:11 AM, John Cowan wrote: > LLoyd scripsit: > >> John, if you can confirm? > > Exactly right. > >> Please also provide the "cat /mnt/c/file1" and "cat /mnt/c/file2" from UoW. > >>From the Cygwin shell (note that my Cygwin and Windows home directories > are the same: /home/cowan is a Cygwin symlink to /cygdrive/c/Users/cowan): > > cowan AT large-skunk ~ > $ echo stuff >file1 > > cowan AT large-skunk ~ > $ cat file1 > stuff > > cowan AT large-skunk ~ > $ ls -l file1 > -rw-r--r--+ 1 cowan cowan 6 Apr 13 08:57 file1 > >>From cmd.exe: > > c:\Users\cowan>echo stuff >file2 > > c:\Users\cowan>type file2 > stuff > >>From UoW bash prompt: > > root AT localhost:~# cd /mnt/c/Users/cowan > root AT localhost:/mnt/c/Users/cowan# cat file1 > cat: file1: Permission denied > root AT localhost:/mnt/c/Users/cowan# cat file2 > stuff > root AT localhost:/mnt/c/Users/cowan# ls -l file1 file2 > -rwxrwxrwx 1 root root 6 Apr 13 12:57 file1 > -rwxrwxrwx 1 root root 8 Apr 13 12:57 file2 > > As you can see, they look exactly the same but are different somehow. > What is more, if I use cmd.exe echo to append to file1 and Cygwin echo > to append to file2, it changes nothing. Likewise, if I overwrite them > completely, it changes nothing. Only if I remove them and re-create > them from the "wrong" side does file1 become readable and file2 become > unreadable. > > This is 64-bit Windows on an NTFS file system, but 32-bit Cygwin. I'll > try installing Cygwin64 tonight and seeing if that makes any difference. You can use the cygwin od (octal dump) command to see the exact byte contents of the files. (Use od -c <file>.) I suspected that one difference was \r\n line termination from Windows echo and \n termination from cygwin echo. That did not explain the two byte difference in length, however. I tried it myself and found that cmd's echo adds a space after "stuff". If I do: c:\Users\moss> echo stuff> file1 (Note: no space before the > !) It writes "stuff" without the extra space. The line termination is still \r\n. cygwin's echo gets rid of the space (because bash trims it before passing the "stuff" argument) and uses \n as the line terminator. As for permissions issues, that would have to do with cygwin's permission system, a rather different topic. Perhaps you did not know that the two echo's are different? Regards -- Eliot MOss -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |