X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave.korn@artimi.com>
To: <cygwin@cygwin.com>
References:  <loom.20080228T135447-901@post.gmane.org> <008b01c87a16$308a0540$2e08a8c0@CAM.ARTIMI.COM>  <loom.20080228T144047-205@post.gmane.org>
Subject: RE: chown with not existing user/group
Date: Thu, 28 Feb 2008 14:55:23 -0000
Message-ID: <009b01c87a19$f24e54d0$2e08a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To:  <loom.20080228T144047-205@post.gmane.org>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 28 February 2008 14:45, Matthieu CASTET wrote:

> But then why does it works if I create dummy user in /etc/passwd.

  Because cygwin relies on the contents of /etc/passwd to be accurate.  Cygwin
cannot in general know what SIDs exist out there in a domain (or even on a
local machine), it treats /etc/passwd as a cache to save going out across the
network to the domain controller for lookups every time a UID is needed.

> For example for root
> 
> $ echo "root:*:0:0:,S-1-5-32-545::" >> /etc/passwd
> $ chown root:root /tmp/toto
> $ ls -l /tmp/toto
> -rw-r--r-- 1 root root 0 Feb 28 14:49 /tmp/toto
> 
> Does it means in this case I create "ACLs with unrecognised SIDs" ?

  No, because 1-5-32-545 is a real SID, hence recognised.  It's a well-known
SID that exists on all windows boxes.  It is, however, a GID, not a UID: that
is the SID of the "Users" group you have set there, so who knows how confused
cygwin might be by that.

  Try a SID that actually doesn't exist, like S-1-5-23-599 for example, and
you'll see it doesn't work.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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

