delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/14/18:11:54

X-Spam-Check-By: sourceware.org
Date: Tue, 14 Feb 2006 18:11:43 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Lennart Borgman <lennart DOT borgman DOT 073 AT student DOT lu DOT se>
cc: cygwin AT cygwin DOT com
Subject: Re: Perl creates html-file, view from cmd.exe => Access is denied
In-Reply-To: <43F25AF8.2010209@student.lu.se>
Message-ID: <Pine.GSO.4.63.0602141806510.25038@access1.cims.nyu.edu>
References: <43F25AF8 DOT 2010209 AT student DOT lu DOT se>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Tue, 14 Feb 2006, Lennart Borgman wrote:

> I use cygwin perl to create some html files from cygwin sh. When I then
> later from cmd.exe (or cygwin sh) try to open one of these files from
> the command line with
>
>    temp.html
>
> I get the error "Access denied". This does not happen if I use the same
> trivial script from cmd.exe using ActiveState perl.
>
> There seem to be some problems with the ACL list for the created file.
> It looks to me like a cygwin bug. Below are more details.

It's not a bug, it's a feature. (tm)

Cygwin-created files are not executable unless they are explicitly created
with executable permissions on.  Perl doesn't do that, so you get a
non-executable HTML file (and can't run this from CMD).  ActiveState perl
lets Windows pick the file ACLs, which are usually based on directory
inheritance.  To simulate this in Cygwin, use "CYGWIN=nontsec perl
myscript.pl".

That said, you can also achieve the same effect (i.e., launching the
appropriate command for the file) by prepending "start" in cmd.exe or
"cygstart" in a Cygwin shell, no matter what the permissions are (i.e.,
use "start temp.html" or "cygstart temp.html").
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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