This is the mail archive of the
cygwin
mailing list for the Cygwin project.
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: Thu, 8 Aug 2019 15:41:55 +0000
- Subject: 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=dBYrfPygkdzmR2W6jxno09S9Ha/5N7tbY6BQZbcfvO4=; b=aFKUDk0Up5xATzcCrGDojmG5xAEeQdSDwSHIsH0VqmKNLvbBlqTbTlz7nS4LOayvCTUDpZSpr/EE9sbErfn0kA81xSGKPGVauCJR44jyJ7I3CB/2SDUvkZhaxoeeApXnrKq3+Pe85eGrAlEtmaI7/ZbYDtSjz79z2pwVO1QWXo0oDd2ORm28qiMwUv2PuGaG5rjzBlsKYUyupHPUovbFqdhgUmw5227BpKA3dQNFM3u0rqNBwN3lgBxkLqWNqTnuHIBbWxm3uC2iNbkDB6WQzxixSp7NUevU8pHDTRx/ms9qB2m32hQhkfGC1yLLnd134L713cZkzfJ37x20hbeYAQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jBVGfDXIzMc7TdrU7XHEhJEsVPcyOwr7/YMA6/NYF9X/t7oawua9AYJxiNgZgOHG4CwRImmptKZt/OMzpNzYH3gL9FacD1urLjjHt0AzDRYwIXfpA07NBeY6sdPzv8db58TiqemddHRjatigZ5+kKNccO4KpzZI2g+CqSFFYZjVMFXV+HILrUkTc9FhYnrCg9zGO/h/brNultjAQtABeURanEQ2t0nQC6jSdT4CdT84A4i8h2WJYMhrBlIZn4A96wCU5PV4M0iNWO2Qy2p106BQvbjx4b/gjUf9bPa4O4YfG+3yhi8MeT+C21mrB5QUPBPdHf1531K0Q6f9E/HxQtw==
- Ironport-sdr: CZto0Z2vWfrP8ReUcWutm/bVnW4oWYJtcFu5+3SELgXOYQPaWLrMZtY+ukfvudXjRxGUH3689a QfJWrC5ZTuLJF9Tgxa4hoBNEvxheK/9/Y2yaHPNvw+lMHvFfycr9hOisLhLcDvXoOXIj92cj00 IQmQ1HrzEqYmXoHcw1OnzxsFI9U8gzeN+DaboL5w6ACxQtOx4TAx8buq/8kHHLfx+cCoHjGWTS 5kL3WlPC4qWMoP5lliiAdNeg45gXxU2oJoibu+VWaGmJlCXwlRYcZuSmWBEhkiGmd24Sgpfj2R EZI=
- Reply-to: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" <lavr at ncbi dot nlm dot nih dot gov>
Hi,
Here's the situation, I have a netmount "Z:" but I cannot make any files on it executable from Cygwin:
$ mount
...
Z: on /cygdrive/z type smbfs (binary,posix=0,user,noumount,auto)
$ cd /cygdrive/z
$ pwd
/cygdrive/z
$ cat a.c
#include <stdio.h>
int main()
{
printf("Hello world!\n");
return 0;
}
$ gcc -Wall a.c
$ echo $?
0
$ ./a.exe
-bash: ./a.exe: Permission denied
$ ls -l a.exe
-rw-rw-r--+ 1 lavr cppcore 157753 Aug 8 11:29 a.exe
$ getfacl.exe a.exe
# file: a.exe
# owner: lavr
# group: cppcore
user::rw-
user:lavr:rw-
group::r--
group:cppcore:r--
mask::rw-
other::r--
$ chmod a+x a.exe
$ echo $?
0
$ ls -l a.exe
-rw-rw-r--+ 1 lavr cppcore 157753 Aug 8 11:29 a.exe
$ getfacl.exe a.exe
# file: a.exe
# owner: lavr
# group: cppcore
user::rw-
user:lavr:rw-
group::r--
group:cppcore:r--
mask::rw-
other::r--
$ ./a.exe
-bash: ./a.exe: Permission denied
What's missing? How to make the file executable, and why chmod() lies about all-good when it does nothing?
Any ideas please?
Thanks!
P.S. I have another netmount "drive" (U:) which Cygwin identifies as "netapp", and everything works on that drive,
regarding the execution permission.
U: on /cygdrive/u type netapp (binary,posix=0,user,noumount,auto)
Also, any file that I give the "x" permission from outside Cygwin (e.g. from Linux) on the SMBFS drive "Z:",
becomes executable:
Cygwin> $ gcc -Wall a.c
Linux> $ chmod a+x a.exe
Cygwin> $ ./a.exe
Hello world!
--
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