This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: SMBFS mount's file cannot be made executable
- From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin" <cygwin at cygwin dot com>
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Date: Wed, 14 Aug 2019 00:53:32 +0000
- Subject: Re: SMBFS mount's file cannot be made executable
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ncbi.nlm.nih.gov; dmarc=pass action=none header.from=ncbi.nlm.nih.gov; dkim=pass header.d=ncbi.nlm.nih.gov; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IXrYb8YyPjS2ILOpfdNfmwo3UR3O+IC518WJVjpylUI=; b=FQvPB8cBYWbP4EM7jG8ArNr/vex5Nu5WjR81HzP+iySlqD/8q0Tj8P96yxpueBxNgBmHWjxcpOTGnDHXhmvVZhPLNk7+oZPAZpKXSz7ySnTqfoURkLCym5XOYiowgnayHjmbwnds+Ce16u/TCUk+IncVesdmDLrG3H2wz6+HUk5D7CrcicQldJ+4/19Zy1miNZ3PMcMQ25nvvr3LgPAD/5bPo5LanO18FaAxd5hy3p4FtNi8qgTMuMyo49/GDx3hgZjTUSqOPDoNN+glnLDk2WuTNgkoIpSCPnSp5BFvAIjsBYhX9K3hYqWDw6/onmRfuUYIfCp0jRxMIXjappigAQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dXL0q6DVeUMW8348DhuxbyWbb2igZdcgdbrk1O+hlE4qUv3gGw3eSY8GQ7dv78THbPsBh7G3CvcuAL9jvcGLQimYs9bGCNWBl7TqcmfblbovCxdjsPoKkM8S9p6DGRM3KRghY/jEx2fKsCWDyHB44xc9HsWAM3kvA+VmDnrduBYkrLEYzOl0xhJOpJGISYN7bPlhS0aR5qYDEkiyKg7UaB1wneDJYnH0riOr8JNDvvqPi9FMP1COLacvwGBnw9pSD2mJhEYyy9BpkGLz+P/II929HDecz3YyGXTEBCYGolVS+SCTWXz/32+sdrDUBWF+j/g3Tp7ykIiR8YrQOjiDNw==
- Ironport-sdr: 1k0I12IEKSceUOZ2jRH0JvUoAMM61zZmFO65NO0+G50tefIqji3l47DCImuMA6g4NFvktgMkn/ 8FSSTqQQ7x+FcI9DCxjlQ6Bx9IUmUCUcDVGoolA/l/jaJMQS6UGbSKk9kbtOOlTmvI9J1Hhsqf zD1MMgNJUFwT1x57e8kVdXRBgsPEazS6ajMB9+Aciq1oCuJXRd2hATvyVCAQLe+imiQ0aJOE25 Kvhr/55DYuXHZrnJIpPCru04kP42o1GmJuV7B7b3kxld4DSxWL5Lgx2f82EhaIpZMW7XSx7VNy +RI=
- Reply-to: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" <lavr at ncbi dot nlm dot nih dot gov>
> 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