delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/01/10/09:32:41

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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=pYO4a2VnbYHediytFzJvpX5lorylls97jdVps5iZeiV
I2d1Wld5qejAiqx2XaVdOa6rX3z8diK2On2bFBnc0R5ZWtyNMYEcDKEOXDeHjWPX
uxOs5kYy7uD9cJcXOoOI3Q+ThNPPJPRUOwrOQW4R+RlrR75uVDH/Qlg7HuT+iRfc
=
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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=mrbsQ76tfquDpwywp131vyTrxvE=; b=wwV7p0Jz63Kj1ATsn
/rrUHZoRE+A38F1RBNN14HHdSNs//n3kqKe+yjINOBKuSbj9OAk/qZzpQ3xx8hQr
R248bGlE7qm7+oZyTCETj4NLg5p+rhbAszPPu0ao3fV4MtFuX2N0SL5vuQobOuyk
F1gaDPUgnDPYuCOemfinHYZJY4=
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=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2
X-HELO: mail-ig0-f178.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=+bkRwV2qRiRaYR8U9sKCP8q11/YRF6laBFZA6OfP74w=; b=YXExMWlc1/w4mCfY1InylWBFm3FBKoguiIZH3cW9cH4G/5q1BfJsz3v4mqXqeXH3KG YrkWuYCrDV5ve0s2KKA4k+FS2eP+agaa/FkeXu5suKuwV2VY7/hr87mz3Ubg/PNReGKq N940s2pa30GaP8qaC4ROPcCPAJVCs3S95t91a6BlVYA7pMjdAgkAdA758n/QbGLxIocQ sPfluYikHEGgmTv+79fZLqRrVxtWg4TFTFrQ2JPXAdGRTHRcrTry2j+vGfPfYa+ABpJD 2IkHjnZLQkMQOLzEbGmgzdflsO5bonMBBgA0FPP3eSpgYtn4PFuz2+GI07YtfqZn6M3W LCGA==
X-Gm-Message-State: ALoCoQlucZjxblm3eMA/44K3RuYfMiOy29O5dGX44wBAhqzobKshQUtmFGZZvxcyOPK/vou6dvNo
X-Received: by 10.42.61.4 with SMTP id s4mr8192366ich.58.1389364340472; Fri, 10 Jan 2014 06:32:20 -0800 (PST)
Message-ID: <52D00470.1000901@whitelancer.com>
Date: Fri, 10 Jan 2014 09:32:16 -0500
From: John Smith <john AT whitelancer DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Windows 8 group won't respect /etc/passwd or /etc/group
References: <52CD6FF0 DOT 1010309 AT whitelancer DOT com> <20140108155850 DOT GG1336 AT calimero DOT vinschen DOT de> <52CD85EC DOT 3090108 AT whitelancer DOT com> <20140108174930 DOT GJ1336 AT calimero DOT vinschen DOT de>
In-Reply-To: <20140108174930.GJ1336@calimero.vinschen.de>

Well, actually, I take that back.  Today I'm still having the same 
issue.  :frustrated:

If I ever figure it out I'll let you know.  Maybe it's just Sublime Text 
that is the issue and I'll just have to use something else.

On 1/8/2014 12:49 PM, Corinna Vinschen wrote:
> On Jan  8 12:07, John Smith wrote:
>>> That's not how it works for me, even with Notepad.  It only changes
>>> the file content, not the ownership.
>>
>> If you create a file outside of cygwin, you should see it as a group
>> of none, correct?  Then if you update that file's group using cygwin
>> to "chgrp Users", cygwin reports that file correctly changed groups.
>> But the problem comes now when I that file again outside of cygwin,
>> then look at the file again in cygwin, the group has once again
>> reverted to ?????.  I don't recall seeing this happen on a previous
>> install (I've used cygwin for years) but some new things for me is
>> that I'm running Win 8.1 (user is that windows live account) and I'm
>> also trying out cygwin64.
>>
>> Are you able to test this
>
> Almost.  I'm using a domain user account but the mechanism is the same.
>
>> and say you are not seeing this?
>
> I'm not seeing this.  Creating the file with Notepad sets user and group
> to myself and my primary domain group.  `Chgrp Users' on that file
> changes the group to the group Users, which is a local (==non-domain)
> predefined group, which is confirmed by ls -l.  Then I start Notepad
> on the same file again, change it, and save the changes.  Afterwards,
> the file's group is still "Users".
>
>>>> In *nix, once you change a group, just editing a file won't change
>>>> the group back to something else.
>>>
>>> That doesn't happen on Cygwin, too.
>>
>> This is the behavior I'm seeing -- so maybe cygwin isn't really able
>> to change the group, then?
>
> Yes, it can.  Changing the group does change the security descriptor on
> disk.  The effect you're seeing is weird, but it's not how Cygwin
> usually works.
>
>>    But again once I
>> edit that file the group reverts to ???? and I lose group
>> permissions again. I don't get it.
>
> Me neither.  But see below.
>
>> My apologies, I was just thinking that if I could get my programs to
>> open up and make them set the default group to Users whenever they
>> add/edit/update/etc a file that might solve the issue, but I am not
>> sure that will at this point.  And I'd have to find some way to do
>> that across the board, which I think you said wouldn't work.
>
> It works for Cygwin and non-Cygwin processes started from a Cygwin process.
> It does not work for processes started from explorer.
>
> OTOH, I don't understand what you're trying to accomplish.  You can just
> change the name of the "none" (or "HomeUser", see below) group in
> /etc/group and be happy.  The group membership doesn't really matter on
> a non-domain standalone system anyway.
>
>>>   Try the icacls command on a file to see
>>> what it prints and compare the info with your passwd and group files.
>>
>> I'm not sure how to read this.  It's giving me a list of
>> permissions, but how do I know what group cygwin sees?
>
> You don't.  Windows doesn't use the primary group field for any
> purpose, so there's no reason for a WIndows tool to print the
> primary group.  At least, so far Windows never used the primary
> group for any purpose, but see below.
>
>> I can
>> understand this is the hierarchy of permissions, but I don't see a
>> "none" group anywhere --
>
> It's not a hirarchy.  It's just a list.  And, yes, the None group
> is missing.  But here I'm wondering.  Do you have the HomeUsers
> group in /etc/group?  If not, add it.
>
> I can't be sure, but it seems that Windows uses that group as primary
> group if you're using the HomeGroup sharing stuff, which I have no
> experience with.  I tried to reproduce this, but this is apparently not
> enabled on enterprise systems.  But I read a bit about it, and it
> seems to have a life on its own, for instance:
>
>    http://www.tomshardware.co.uk/forum/27119-63-remove-user-homeusers-win7
>    http://social.technet.microsoft.com/Forums/windows/en-US/4d059295-838e-4e81-9658-823897a5bda2/
>
> Probably best not to use it and only use normal workgroup sharing.
>
>> icacls cc.txt
>> cc.txt WHITELANCER\John:(RX)
>>         Whitelancer\HomeUsers:(I)(RX)
>>         BUILTIN\Administrators:(I)(F)
>>         NT AUTHORITY\SYSTEM:(I)(F)
>>         WHITELANCER\John:(I)(F)
>>         Everyone:(I)(RX)
>>
>> If that is the case, how do I make a manual entry in my /etc/group
>> for a "John" group?
>
> Don't.  That's your user account.  It doesn't belong into /etc/group.
>
>
> 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