remount a subfolder on /cygdrive/c with notexec
ilya Basin
basinilya@gmail.com
Sat Sep 7 08:15:57 GMT 2024
Hi. I want to speed-up access to Google Drive from Cygwin and I want to disable ReadFile when files are statted.
I did the following:
mkdir /cygnotexec
mount -obind,notexec "/cygdrive/c/ClusterStorage/gdrive/blahblah@gmail.com" "/cygnotexec/basinilya@gmail.com"
mount -obind,notexec "/cygdrive/c/ClusterStorage/gdrive/blahblah@gmail.com" "/cygdrive/c/ClusterStorage/gdrive/basinilya@gmail.com"
Never mind "C:\ClusterStorage\": it's a global antivirus exception maintained by my company. This is why I have configured Google Drive to not use g:\
So when I bind mount to a new location and do 'stat *' there, the SysInternals procmon shows no "ReadFile" calls, but if I repeat that in the original location it shows "ReadFile" for every file.
`mount` prints that "notexec" is enabled at both, but it's only effective in the new location.
Also, `df` sees that the mount is different and prints the available space for Google Drive correctly, but Cygwin doesn't treat it as NFS and doesn't imply "notexec". Should it?
$ mount
C:/ClusterStorage/gdrive/blahblah@gmail.com on /cygdrive/c/ClusterStorage/gdrive/blahblah@gmail.com type vfat (binary,notexec,user,bind)
C:/ClusterStorage/gdrive/blahblah@gmail.com on /cygnotexec/blahblah@gmail.com type vfat (binary,notexec,user,bind)
More information about the Cygwin
mailing list