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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=uboW0UprBlHqO3DwrophX2ep5YIAz14w3ZyoPOmQCn2fsrn3zzoz1 H3FEtQvJT7F4VucYNYKBnf90A/srz95lvQc0WxJDGvr0vRs6OZtKeCvFF2OYux2O AbI+xZ1MV2f+KPnDRddr3RYqnwJ1NA45sgEXgR76+dOmiZnV9D51yc= 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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=mlv7F++I+00ygTSrj7ci5KvXLCY=; b=ycr4luP9Gj3xP7/nNmDTUH1ZnRhg qkSOClwjuIdjVTxiERX7KVBX+SgBPY6Jnbyu65+1twLjMBgzgkjahYpi2bgbqIjM 5TOY9TIx0Q+ZHzvB5on/avO2Vt6yzCYpn+j4qoTyA/A52VqTFKUyBIc6MhV0du/g PCYIe9eyzJiRRd8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Date: Wed, 8 Jan 2014 18:49:30 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Windows 8 group won't respect /etc/passwd or /etc/group Message-ID: <20140108174930.GJ1336@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <52CD6FF0 DOT 1010309 AT whitelancer DOT com> <20140108155850 DOT GG1336 AT calimero DOT vinschen DOT de> <52CD85EC DOT 3090108 AT whitelancer DOT com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QWpDgw58+k1mSFBj" Content-Disposition: inline In-Reply-To: <52CD85EC.3090108@whitelancer.com> User-Agent: Mutt/1.5.21 (2010-09-15) --QWpDgw58+k1mSFBj Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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 (=3D=3Dnon-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. >=20 > 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. >=20 > 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-4e= 81-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) >=20 > 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 --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --QWpDgw58+k1mSFBj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJSzY+qAAoJEPU2Bp2uRE+gfhcP/jigW9Oph5bMI/ZfbUxQesSy GdypgLJ22fMETinx57WMcC882SHWq4tZfp43aZlRyrP26gqKbYHGVTCWX18vdycF bjn1jSh+Tv1Frq4DM4K9MsYDkyAXUWcE12ffV6/hS5KaUWw4e53uZu67ZKTLi2uz bCDZ+f+gopMfUYVKABm20uK2vNGWAeRoLVm8f4wAFrKxExbTq91eSBbARprCLvc9 gEzF+MPwpBXTJ8L9H6Nna+Fr1aynxdi7f28HhyYExY2p9qpt6uO4SeYSdB0UnbHt WBuP8tWPpeaAS7XrbJbkTFD6UVcJ55KpxUF1V4JLfGUkTihg0OFLYMxPb2AWUYJy JjoCyqVH0ao+LWKalixv7qPRZ3Vfng1xuDmDLG2Ou8DLwhb6p1NlYK7uH7pcNdgu vPI2zCSrOaDICk1RVo1/En7WZoEqcsLfZEOq4Tp/uHpwhB643Pr8dWd3RMIVF1FR m11pvp54yZeYplEgEnrV4e+xloP43X+89+Rgj/7xM4/0cFQpUltN5ZWox/xUtqPx hz1pnEJpqB4YEbFBSuiYEIsMivy5CBvijQAy9DDftiFpGVXyRPUcr2b+/myIvaTm t6xuyQ1M8F+lG01+nd3QqldvNs+IKI7LZWYIf5hZN+1cnTlxcVwP8MGebP9ryGKx Xx+mJrg9iqyrPVHGlOtd =xRo4 -----END PGP SIGNATURE----- --QWpDgw58+k1mSFBj--