This is the mail archive of the cygwin@cygwin.com 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]

CYGWIN=ntsec Pragmattics


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/


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