This is the mail archive of the 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]

Re: Why is the file created via "cmd /c echo.>1" reported by "ls -l" as owned by Administrator and group None?

On Fri, Aug 31, 2001 at 12:16:56PM +0100, malcolm.boekhoff wrote:
> Dear Cygwinners,
> If I do this in a Dos, prompt:
>     echo.>1
> and this in the same directory in a Bash prompt:
>     echo>2
> 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
> properly.

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                      
Red Hat, Inc.

Unsubscribe info:
Bug reporting:

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