This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: chmod, ownership, etc


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]