delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/11/12:22:44

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 11 May 2012 18:21:34 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: CYGWIN inode over Samba share not constructed from IndexNumber
Message-ID: <20120511162134.GJ13090@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <6 DOT 2 DOT 5 DOT 6 DOT 2 DOT 20120511114149 DOT 05c9f560 AT flumedata DOT com>
MIME-Version: 1.0
In-Reply-To: <6.2.5.6.2.20120511114149.05c9f560@flumedata.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
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

On May 11 11:42, starlight DOT 2012q2 AT binnacle DOT cx wrote:
> Hello,
> 
> Ran into a quirk that caused some trouble.
> 
> For some reason CYGWIN 1.7.5 (I know this is old)

You should really update.

> is constructing inode values for files on
> Samba (3.6.4) shares with a different algorithm
> than is used for files on NTFS volumes.
> 
> This caused a script that checks for matching
> hard-links to fail.
> 
> Confirmed that Samba is returning the actual
> inode values in 'IndexNumber' with 'procmon'
> while running the
> 
>    stat -c '%h %d %i' filename
> 
> command.  See https://lists.samba.org/archive/samba/2012-May/167381.html.
> 
> Is CYGWIN mistaking the Samba share for a FAT32
> volume and using an inode-faking algo?  Or

It depends on what Samba returns as file system information.  Right now
Cygwin expects valid inode information only from filesystems which
return the FILE_PERSISTENT_ACLS flag, except for netapps (never) and nfs
(always).

Additionally, the returned file ID must be > 0xffffffff, otherwise we
don't trust the server to generate usefule file IDs.  This usually only
affects remote NT4 NTFS and Samba < 3.0.

Assuming your Samba drive is //server/share, please run

  /usr/lib/getVolInfo //server/share

and post the output as reply here.  As an example, this is what my
Samba shares return:

  $ /usr/lib/csih/getVolInfo.exe //server/share
  Device Type        : 7
  Characteristics    : 10
  Volume Name        : <corinna>
  Serial Number      : 2469776470
  Max Filenamelength : 255
  Filesystemname     : <NTFS>
  Flags              : 1002f
    FILE_CASE_SENSITIVE_SEARCH  : TRUE
    FILE_CASE_PRESERVED_NAMES   : TRUE
    FILE_UNICODE_ON_DISK        : TRUE
    FILE_PERSISTENT_ACLS        : TRUE		<- !!!
    FILE_FILE_COMPRESSION       : FALSE
    FILE_VOLUME_QUOTAS          : TRUE
    FILE_SUPPORTS_SPARSE_FILES  : FALSE
    FILE_SUPPORTS_REPARSE_POINTS: FALSE
    FILE_SUPPORTS_REMOTE_STORAGE: FALSE
    FILE_VOLUME_IS_COMPRESSED   : FALSE
    FILE_SUPPORTS_OBJECT_IDS    : TRUE
    FILE_SUPPORTS_ENCRYPTION    : FALSE
    FILE_NAMED_STREAMS          : FALSE
    FILE_READ_ONLY_VOLUME       : FALSE
    FILE_SEQUENTIAL_WRITE_ONCE  : FALSE
    FILE_SUPPORTS_TRANSACTIONS  : FALSE

If your Samba doesn't set FILE_PERSISTENT_ACLS to TRUE, you have to
change your smb.conf file so that it does.  


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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