X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Fri, 7 Aug 2009 09:48:07 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Can't execute scripts from a samba share with 1.7
Message-ID: <20090807074807.GM3204@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <h5cqnj$c9f$1@ger.gmane.org> <20090806142010.GE3204@calimero.vinschen.de> <h5f54a$nkt$1@ger.gmane.org> <20090806180441.GB19829@calimero.vinschen.de> <h5fho1$u66$1@ger.gmane.org> <4A7B5346.9060307@cygwin.com> <h5fm1k$a6s$1@ger.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <h5fm1k$a6s$1@ger.gmane.org>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
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

On Aug  6 15:38, Nahor wrote:
> Larry Hall (Cygwin) wrote:
>> On 08/06/2009 05:25 PM, Nahor wrote:
>>> Corinna Vinschen wrote:
>>>>  Note that it doesn't do a simple
>>>> POSIX permission bit check, rather it calls an OS function asking
>>>> "does *this* account have the right to execute *that* file?" That
>>>> should result in the most consistent behaviour, as far as Windows
>>>> consistency goes.
>>>
>>> Cygwin can't also check with an account with the same login and
>>> password? I assume that's what Windows does and why I'm allowed, as a
>>> user LOCAL\nahor, to access the share that belongs exclusively to the
>>> user DOMAIN\nahor.
>>
>> I doubt that assumption would hold up to much scrutiny.  Local and
>> domain users, despite how similar the name and/or password might be,
>> don't have any relationship to each other.   There's a unique ID
>> generated for a user of either type so there's no definitive way to
>> correlate one user ID with another, even if that was desirable.  I
>> think you'll find that you have access to the share because you've
>> been authenticated to use it, regardless of whether you're using the
>> local or domain version of your login.  But that has little bearing on  
>> the
>> script in question.  Since Windows doesn't see the script as executable,
>> asking it for help in this matter wouldn't be useful, no matter who the
>> user is when the question is asked.
>
> Maybe you're right but why can I execute a binary then?
> I copied notepad.exe on the share. I set its permissions to 700. I can  
> then launch notepad without problem. But with scripts, that doesn't work.
> So somewhere, in Windows or in Cygwin, something must behave  
> differently. Could it then be that Windows doesn't check the execute  
> permission when executing from a share?

I think there's some magic going on between your local Windows and the
Samba server.  This magic doesn't kick in when performing a straight
permission check.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

