SMBFS mount's file cannot be made executable
Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Tue Aug 13 12:27:00 GMT 2019
Thanks for responding!
> You need the "exec" mount option.
I thought so too, but how do I give that option to a drive that is "noumount". I cannot dis- or re-mount it AFAICT.
Z: on /cygdrive/z type smbfs (binary,posix=0,user,noumount,auto)
$ umount /cygdrive/z
umount: /cygdrive/z: Invalid argument
Also, I tried to mount the same path elsewhere, and with the "exec" options, and that wouldn't help, either:
$ mount -o exec //coredev2/home/lavr /mnt
//coredev2/home/lavr on /mnt type smbfs (binary,exec,user)
$ cd /mnt
$ gcc a.c
$ ls -l a.exe
-rw-rw-r--+ 1 lavr cppcore 157753 Aug 13 08:20 a.exe
-bash: ./a.exe: Permission denied
(and again, if a.exe is given the "x" perm in the Linux fs, the command above works)
I think that something's wrong with how (or if) Cygwin translates the "x" unix execution permission bit to an ACL that is passed thru SMB -- it does not get transferred to the Linux side correctly. But if set there, then it gets converted to the execute ACL the right way, and that makes the file executable on the Windows side... I do not know how is it all implemented, though; it's just my observation.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin