Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com> List-Archive: <http://sources.redhat.com/ml/cygwin/> List-Post: <mailto:cygwin AT sources DOT redhat DOT com> List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Fri, 31 Aug 2001 14:18:51 +0200 From: Corinna Vinschen <cygwin AT cygwin DOT com> 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? Message-ID: <20010831141851.A28329@cygbert.vinschen.de> Mail-Followup-To: Corinna Vinschen <cygwin AT cygwin DOT com>, Cygwin News Group <cygwin AT sources DOT redhat DOT com> References: <20010831121656 DOT A183 AT BOEKHOFF_M> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010831121656.A183@BOEKHOFF_M>; from malcolm.boekhoff@actfs.co.uk on Fri, Aug 31, 2001 at 12:16:56PM +0100 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: > > 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 chapter? http://cygwin.com/cygwin-ug-net/ntsec.html. > 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 -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/