delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/25/05:45:36

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Sun, 25 Jan 2009 11:45:12 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: chmod, ownership, etc
Message-ID: <20090125104512.GG24485@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <21649645 DOT post AT talk DOT nabble DOT com>
MIME-Version: 1.0
In-Reply-To: <21649645.post@talk.nabble.com>
User-Agent: Mutt/1.5.17 (2007-11-01)
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 Jan 25 01:04, timcygwin wrote:
> Problem is that the existing files in my Windows area have user ownership
> Administrators, group ownership None, e.g.,
>   -rwxrwxrwx  1 Administrators None            5513 Jul 20  2005
> set_from_reg.awk*
> 
> whereas new files created under cygwin have owner tim, group Administrators
>   -rw-r--r--  1 tim            Administrators     0 Jan 25 08:51 rti
> 
> Before I run through a recursive chown & chgrp to have the ownership set as
> desired (tim/Administrators not Administrators/None), is there something
> that I need to do to fix the ownership rights to save having to recursively
> set them. And will recursive chown & chgrp screw up the existing Windows
> ownership?

Don't do that outside your user's directory or outside the Cygwin dir.
Changing the default Windows permissions on C:\WINNT or C:\Program Files
is not a good idea.  You might screw up your system.

> Well I've had a quick play, creating files under Windows come up with
> ownership Administrators/None, files created under cygwin come up with
> ownership tim/Administrators, so I'd really like to have cygwin set up such
> that it reports tim/Administrators rather than Administrators/None even for
> files created under Windows 

Cygwin reports reality.  If the file is owned by the Administrators
group and the group None, it reports that.

> - or perhaps the solution will be: What you need
> to set up in Windows such that ownership  will be reported as
> tim/Administrators.

That's not possible.

First of all, if your account is an administrative account (one which is
member of the Administrators group), the default ownership of all files
you create is the Administrators group.  This "feature" of NT4 and Win2K
has been changed with Windows XP which sets the owner of a file to the
creator account by default, unless a Local Security Policy setting
("System objects: Default owner for objects created by members of the
Administrators group") is switched back to the former NT4/2K behaviour.

Second, if your machine is not part of a domain, the group setting for
all files created by all non-system user accounts on the machine will be
None.  There's no Local Security Policy setting or registry entry in
Windows to change the default group ownership of None in non-domain
machines.  None is not a fake name, it's the actual name of an actual
group on your machine.

See the file permission section in the Cygwin user's guide here:
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-files 


Corinna

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

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

- Raw text -


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