delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/11/22/13:11:49

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: "A.R. Burgers" <a DOT rburgers AT quicknet DOT nl>
Subject: Re: 1.7.8: files exist but can not be read
Date: Mon, 22 Nov 2010 19:11:02 +0100
Lines: 109
Message-ID: <4CEAB236.9080809@quicknet.nl>
References: <4CE83AF7 DOT 5000202 AT quicknet DOT nl> <20101122105746 DOT GQ18309 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6
In-Reply-To: <20101122105746.GQ18309@calimero.vinschen.de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

Hi,

here the script file.sh and its output results.txt,
pasted in the mail, including the output of the ntqueryfile
program. I ran ntqueryfile both on a netapp file and on a local file.

hope this helps

Teun

cat > file.sh <<HERE
#! /bin/sh

uname -a
zz=/shares/g_zon_software/cygwin17
ls -l $zz/text.txt
rm -f $zz/text.txt ./text.txt
cat << HERE > $zz/text.txt
line 1
HERE
cat << HERE > text.txt
line 1
HERE
ls -l $zz/text.txt
echo "*** cat $zz/text.txt:"
cat $zz/text.txt
echo "*** file $zz/text.txt:"
file $zz/text.txt
echo '*** ./ntqueryfile \\\\nas01\\g_zon_software\$\\cygwin17\\text.txt:'
./ntqueryfile \\\\nas01\\g_zon_software\$\\cygwin17\\text.txt
echo '*** ./ntqueryfile C:\\cygwin\\home\\burgers\\tmp\\178_bug\\text.txt:'
./ntqueryfile C:\\cygwin\\home\\burgers\\tmp\\178_bug\\text.txt
cat /etc/fstab | grep g_zon_software
mount -m | grep 'share.*g_zon_software'
HERE

cat > result.txt <<HERE
CYGWIN_NT-5.1 P4114 1.7.6(0.230/5/3) 2010-08-16 16:06 i686 Cygwin
-rw-r--r-- 1 burgers Domain Users 7 2010-11-22 14:31 /shares/g_zon_software/cygwin17/text.txt
-rw-r--r-- 1 burgers Domain Users 7 2010-11-22 14:31 /shares/g_zon_software/cygwin17/text.txt
*** cat /shares/g_zon_software/cygwin17/text.txt:
line 1
*** file /shares/g_zon_software/cygwin17/text.txt:
/shares/g_zon_software/cygwin17/text.txt: ASCII text
*** ./ntqueryfile \\\\nas01\\g_zon_software\$\\cygwin17\\text.txt:
NtQueryInformationFile(FNOI): 0xc000000d
  fsi.AllocationSize 64
  fsi.EndOfFile      7
*** ./ntqueryfile C:\\cygwin\\home\\burgers\\tmp\\178_bug\\text.txt:
fnoi.AllocationSize 8
fnoi.EndOfFile      7
  fsi.AllocationSize 8
  fsi.EndOfFile      7
//nas01/g_zon_software$ /shares/g_zon_software some_fs noacl,binary,notexec 0 0
//nas01/g_zon_software$ /exports/g_zon_software some_fs noacl,binary,notexec 0 0
//nas01/g_zon_software$ /shares/g_zon_software netapp binary,notexec,noacl 0 0
HERE

Op 22-11-2010 11:57, Corinna Vinschen schreef:

> On Nov 20 22:17, A.R. Burgers wrote:
>>   LS,
>>
>> on 1.7.8 files the contents of a file on a netapp share can not be read by all programs.
>> [...]
>> #! /bin/sh
>>
>> uname -a
>> zz=/shares/g_zon_software/cygwin17
>> ls -l $zz/bug.txt
>> rm -f $zz/bug.txt
>> cat<<  HERE>  $zz/bug.txt
>> line 1
>> HERE
>> ls -l $zz/bug.txt
>> cat $zz/bug.txt
>> file $zz/bug.txt
>> cat /etc/fstab | grep g_zon_software
>> mount -m | grep 'share.*g_zon_software'
>
>> CYGWIN_NT-5.1 P4114 1.7.8s(0.233/5/3) 20101118 15:52:06 i686 Cygwin
>> -rw-r--r-- 1 burgers Domain Users 0 2010-11-19 13:35 /shares/g_zon_software/cygwin17/bug.txt
>> -rw-r--r-- 1 burgers Domain Users 0 2010-11-19 13:36 /shares/g_zon_software/cygwin17/bug.txt
>> line 1
>> /shares/g_zon_software/cygwin17/bug.txt: empty
>
> So it appears that you *can* read the files after all, but the stat
> function returns a file size of 0, right?  So all tools which test
> the file size before opening a file will fail.
>
> The question now is, why does it return 0.  What has changed in Cygwin
> is that a core function now uses the FileNetworkOpenInformation class to
> fetch file information.  Maybe that's not quite correctly implemented on
> Netapps?
>
> Can you please give the attached testcase a try?  Link it against ntdll
> and use the DOS path to the file as parameter, like this:
>
>    $ gcc -g -o ntqueryfile ntqueryfile.c -lntdll
>    $ ./ntqueryfile \\\\nas01\\g_zon_software\\cygwin17\\bug.txt
>
> Please paste the output into your reply.
>
>
> Thanks,
> Corinna
>
>



--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019