This is the mail archive of the
mailing list for the Cygwin project.
Re: Why is the file created via "cmd /c echo.>1" reported by "ls -l" as owned by Administrator and group None?
- To: Cygwin News Group <cygwin at sources dot redhat dot com>
- Subject: Re: Why is the file created via "cmd /c echo.>1" reported by "ls -l" as owned by Administrator and group None?
- From: Corinna Vinschen <cygwin at cygwin dot com>
- Date: Fri, 31 Aug 2001 14:18:51 +0200
- References: <20010831121656.A183@BOEKHOFF_M>
On Fri, Aug 31, 2001 at 12:16:56PM +0100, malcolm.boekhoff wrote:
> Dear Cygwinners,
> If I do this in a Dos, Cmd.com prompt:
> and this in the same directory in a Bash prompt:
> the files do not have the same owner/group/permissions:
> Fri 31/08/2001 11:39:43.28 D:\temp>echo.>1
> Fri 31/08/2001 11:50:22.90 D:\temp>bash
> Fri Aug 31-11:50:25 /tmp 501$ echo>2
> Fri Aug 31-11:50:27 /tmp 502$ ls -l ?
> -rw-r--r-- 1 boekhoff Administ 2 Aug 31 11:50 1
> -rwxrwxrwx 1 Administ Domain U 2 Aug 31 11:50 2
> Fri Aug 31-11:50:31 /tmp 503$
> How can I keep the permissions/owner/group consistent?
> I guess I am really curious as to why NT doesn't create the file
Did you read the online user's guide, especially the ntsec
> P.S. I have discovered that I *can* keep the permissions consistent by:
> 1. Start DOS prompt.
> 2. Start bash.
> 3. Start another DOS prompt.
> This appears to sort of work, as the following output shows. However
> it doesn't feel right - starting all those shells and anyway it
When the first process has been started (here `bash') using `ntsec',
the processes' access token is changed to reflect the settings in
/etc/passwd and /etc/group so resulting in POSIXly correct user and
group settings. This settings are inherited by child processes so
a cmd started from bash uses the same settings.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:firstname.lastname@example.org
Red Hat, Inc.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html