SMBFS mount's file cannot be made executable

Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin cygwin@cygwin.com
Wed Aug 14 00:53:00 GMT 2019


> If it's related to the ACL handling then it should start working when
> you remove the ACL on the file with 'setfacl -kb ...'

There are no special ACLs set on the file (that was just produced by GCC from the source code, see my first email).

But I am now convinced that the problem is _entirely_ in Cygwin's corner:

When I open that file's the "Properties->Security" Windows tab, I can see that my permissions are "Read" and "Write", yet
"Read & Execute" is NOT checked.  When I check it, I see that the file becomes executable (the "x" bit) from both
Cygwin shell and on the Linux side, too.  And after that, I can execute the file from the Cygwin shell.

So what happens is that when "chmod" (or "creat" with a permission mask) is called, Cygwin does not honor the "x" bit(s) and does not convert it to
a corresponding proper ACL for the Windows mounted filesystem (and that ACL, in turn, would have been then sent to SMBD to get converted there back
to the "x" bit in the Unix world).  Once the "x" is there, Windows(via SMBD) obviously allows execution of the image.  Here's a related "bug":

https://forge.univention.org/bugzilla/show_bug.cgi?id=33785

I did not investigate in details how Cygwin handles the execute permission, but obviously there's something off.


--
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



More information about the Cygwin mailing list