X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,TW_HR,TW_RW,TW_WX,TW_XR,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-class: urn:content-classes:message Subject: RE: cygwin 1.7.13-1: can't execute shell scripts on samba share Date: Mon, 23 Apr 2012 13:02:13 +0200 Message-ID: <6BFA9AF2C7556E42AFF3F187ECAB07B802F9CFCB@bespdc01.mediaxim.local> In-Reply-To: References: <1E3D6F97-F938-420C-A5F7-C6446EC27F32 AT intersystems DOT com> <1883CD3D-75CE-4289-A5F9-317DE2ED7F28 AT intersystems DOT com> From: "Michel Bardiaux" To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q3NB2lYE011303 [snip] > lgiambro AT lorien ~ > $ cat len.sh > #!/bin/sh > echo it works And man sh states " --norc Do not read and execute the personal initialization file ~/.bashrc if the shell is interactive. This option is on by default if the shell is invoked as sh." Which eliminates bashrc as a possible culprit. I have also tried the same as you did (len.sh on a samba share) and saw the same problem. Then I saw that the len.sh got a (cygwin *and* linux) mode of -rwxrw-r-- *without* doing any chmod. Then I saw that *every* file I create on the samba share, gets the same mode! First things first, is there a workaround? Yes, chmod 777 len.sh *done on linux* works. And it actually works too when done on cygwin. However, recreating len.sh on cygwin, then a chmod 700 len.sh again on cygwin, does not work, again "./len.sh: Permission denied". But the mode seen on the linux side is -rwx------. I have also tried deleting then recreating the file in cygwin, then closing all cygwin processes and unmapping and remapping the samba drive. No cigar. Then I tried cacls in various situations. It turns out that with mode 777, cacls reveals "Everyone:F", but with mode 700 we get: len.sh F (special access:) Everyone:(special access:) And getfacl says: # file: len.sh # owner: ???????? # group: ???????? user::rwx group::--- mask:rwx other:--- Now I would say cygwin behaves as expected in my case: owner has execute permission, but who is the owner? Unfortunately this can only be *part* of the explanation, since for the OP it is # file: len.sh # owner: lgiambro # group: releng user::rwx group::--- mask:rwx other:--- (see thread head for the cacls). His samba setup is obviously better than mine. But now I cant be sure my workaround (mode 777) will work in his case. Hope these can help. -- 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