This is the mail archive of the
mailing list for the Cygwin project.
Re: Can't execute scripts from a samba share with 1.7
Corinna Vinschen wrote:
On Aug 5 13:40, Nahor wrote:
Hi,Cygwin 1.5.x and earlier versions of Cygwin 1.7.0 didn't check execute
I have a samba share mounted in cygwin with the following fstab entry:
//server/nahor /home/nahor smbfs binary,user,exec,acl,posix=0,cygexec 0 0
Permissions are set correctly:
$ ls -al
-rwxr--r-- 1 nahor Domain Users 19 Aug 5 11:46 t.sh
My test script doesn't do much:
$ cat ./t.sh
But when I execute:
-bash: ./t.sh: Permission denied
permissions when trying to start a shell script. Later versions of
1.7.0 do check on filesystems mounted with the "acl" option. Apparently
the check fails. Is there a chance that there are two different
accounts called nahor?
Indeed. One is an account on the local machine and there is another one
on the domain. I login using the local account but the samba share
belong to the domain user.
Running cygwin with the domain user allows running the script. Changing
the permission to 755 also fixes the error.
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
If I mount with "noacl", I get a slightly different error but still no
cigar:This only happens if your account doesn't have execute permissions for
-bash: ./t.sh: /bin/sh: bad interpreter: Permission denied
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
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple