X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Message-ID: <4A804DFD.6090609@dronecode.org.uk> Date: Mon, 10 Aug 2009 17:42:37 +0100 From: Jon TURNEY User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Thunderbird/3.0b3 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Can't execute scripts from a samba share with 1.7 References: <20090806142010 DOT GE3204 AT calimero DOT vinschen DOT de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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 06/08/2009 18:50, Nahor wrote: > Corinna Vinschen wrote: >> On Aug 5 13:40, Nahor wrote: >>> If I mount with "noacl", I get a slightly different error but still >>> no cigar: >>> $ ./t.sh >>> -bash: ./t.sh: /bin/sh: bad interpreter: Permission denied >>> $ >> This only happens if your account doesn't have execute permissions for >> the interpreter, in this case /bin/sh. Is it possible that /bin/sh.exe >> has weird permission settings for some reason? > > The permissions on the interpreter are OK. > $ ls -l /bin/sh > -rwxr-xr-x 1 nahor Administrators 472064 Jul 1 18:20 /bin/sh > $ > > For that matter, scripts running off the local disk run fine. > > Looks like the same problem of inconsistent account ID, setting the > permissions to 755 or running as the domain user fix the "bad > interpreter" error. I also have this problem in it's second (noacl) form. With this mount //necker/jon on /home/jon type smbfs (binary,exec,noacl,user) running the t.sh test script fails in a directory on this mount Jon AT byron ~ $ ls -al t.sh -rwxr-xr-x 1 Jon None 19 2009-08-06 15:46 t.sh Jon AT byron ~ $ ./t.sh -bash: ./t.sh: /bin/sh: bad interpreter: Permission denied but works fine in a different directory Jon AT byron ~ $ cp t.sh / Jon AT byron ~ $ cd / Jon AT byron / $ ./t.sh foo Running .exe's from the share works fine. I don't think I have the option of not using noacl, since this share resides on a LinkStation NAS which is running an old version of Samba (2.2.2 if google is to be believed) without acl support. I'm pretty sure this used to work with Cygwin 1.5 >> One weird thing though, the directory permission are 700 and yet I can >> list the content of the directory, cd in it and add/delete files. So >> permissions are not consistently checked. But then, I assume it's >> because all that is done by Windows/Samba while the permission check on >> the script is done by Cygwin? Same thing with executing binary (I was >> able to execute a binary file copied on the share even though I couldn't >> execute scripts)? > > Most of Cygwin relys on the permission checks of the underlying OS. > In case of scripts, that's not possible. Therefore it has to check > script permissions explicitely. 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. Forgive me if you've already explained the solution, but how then do I arrange for scripts on this share to be seen as executable? -- 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