delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/27/16:59:39

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.1.0.14.2.20020127132441.00b28c78@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Sun, 27 Jan 2002 13:59:24 -0800
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: CYGWIN=ntsec Pragmattics
Mime-Version: 1.0

Hi,

I have a minor issue with Cygwin (all the latest and complete packages 
installed) running with "ntsec" specified using NTFS volumes (of course).

Based on some script code snippets posted here some time back (probably 
about a year ago, but I'm not really sure), I like to occasionally use an 
"open" script that comes down to the following code fragment for opening 
files with whatever application is associated with their extension 
(provided there is one):

	# arg=targetOfOpenCommand
	docFileWin="$(cygpath -w "$arg")"
	cmd /q /c start /b "$docFileWin"


This works great but has the problem that if the target file does not bear 
execute permissions (as Cygwin renders them into their POSIX file mode 
equivalent), the response from CMD.exe is "Access is denied." I notice 
that, as one would expect, when a Cygwin process (wget being a prime 
example in practice) creates a file, its mode is 666 "less" the current 
umask--just as it should be. When a native Windows application creates 
files, they have execute bits across the board.

Thus I find that to use my nice BASH "open" script, I must first give 
execute bits to any files to which I want to apply it.

Does anyone know of a way around this? I guess ideally I'd prefer to get 
"open" (CMD.exe--perhaps there's an option of which I'm unfamiliar) to go 
ahead and open the files to which it thinks "Access is denied." 
Alternately, is there a way to alter the way Cygwin assigns Windows ACL 
attributes for files it creates (or chmod's) so that Windows / CMD.exe 
doesn't think "Access is denied." for the purpose of trying to open them 
with their associated application?

I'm reluctant to put a "chmod" call into the "open" script, but I 
acknowledge that as one work-around.

Any help or insights would be greatly appreciated.

Randall Schulz
Mountain View, CA USA


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

- Raw text -


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