cygwin 1.7.13-1: can't execute shell scripts on samba share

Michel Bardiaux
Mon Apr 23 11:02:00 GMT 2012


> lgiambro@lorien ~
> $ cat
> #!/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 ( on a samba share) and saw
the same problem. Then I saw that the 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 *done
on linux* works. And it actually works too when done on cygwin.

However, recreating on cygwin, then a chmod 700 again on
cygwin, does not work, again "./ 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: <Account Domain not found>F
              <Account Domain not found>(special access:)
              Everyone:(special access:)

And getfacl says:

# file:
# owner: ????????
# group: ????????

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:
# owner: lgiambro
# group: releng

(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:
Unsubscribe info:

More information about the Cygwin mailing list