X-Spam-Check-By: sourceware.org
Message-ID: <43F264BE.2060202@student.lu.se>
Date: Wed, 15 Feb 2006 00:16:14 +0100
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Perl creates html-file, view from cmd.exe => Access is denied
References: <43F25AF8.2010209@student.lu.se> <Pine.GSO.4.63.0602141806510.25038@access1.cims.nyu.edu>
In-Reply-To: <Pine.GSO.4.63.0602141806510.25038@access1.cims.nyu.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Igor Peshansky wrote:
> 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
>   
Many thanks for the quick and good explanations!

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

