<div dir="ltr"><div><div><div>This is mildly OT and a long shot, but I'm hoping someone has dealt with MinGW's or Git Bash's mount/msysmnt commands on Windows.<br></div><div><br>I'm using Git Bash (essentially MinGW from what I read, with GIT added) at work.  Due to some Windows 7 Group Policy pushed down by our IT department, we can't run Cygwin binaries in Git Bash unless they're part of the Git Bash directory structure.  We can run stuff (including these binaries) as Administrator, but another policy enforces authentication, and we're expecting to use this enough that authentication every time would be a pain.  We can't run cmd.exe or the Cygwin console without Administrator privileges, but for some reason Git Bash will run ... with strange limitations.<br>


<br>Git Bash starts with C:\Program Files (x86)\Git\bin\ "mounted" as /bin/ and the entire C: drive as /c/ - but bizarrely, if you do an "ls /" the /c/ doesn't show and isn't available for tab completion.  I have the Cygwin binaries in /c/cygwin/ , their default location.  If I try to run them as a regular user in Git Bash, I get:<br>


<br>   sh.exe": /c/cygwin/bin/ls: Bad file number<br><br></div>That applies to pretty much any Cygwin binary: I haven't tried all of them, but every one I've tried has responded that way.  (Googling "Bad file number" was unproductive, at least for me.)  However, if the Cygwin binary is moved to /bin/ in the Git Bash environment, it runs fine.  Unfortunately, there's quite a structure of files we need to run Vagrant ...<br>


<br></div>So what I'm hoping is that we can graft the required tree structure onto the pseudo-file-system Git Bash has constructed for itself.  There's a mount command that's actually a bash script, that ultimately calls msysmnt.exe .  "--help" gets some information out of the latter binary, but I can find no documentation and the help isn't enough to actually make it work.  What little I can get from it suggests that the correct command form is this:<br>


<br>   $ mount "C:\HashiCorp\Vagrant\embedded" /embedded<br><br></div>This finishes silently, after which you have a /embedded/ folder, but nothing under it.  Errors I've seen at other times suggest that another parameter is needed.<br>


<div><br>Is anyone familiar with this?<br><br><br><br>$ msysmnt.exe --help<br>Usage: msysmnt.exe [OPTION] [<win32path> <posixpath>]<br>  -b, --binary                  text files are equivalent to binary files<br>


                                (newline = \n)<br>  -c, --change-cygdrive-prefix  change the cygdrive path prefix to <posixpath><br>  -f, --force                   force mount, don't warn about missing mount<br>


                                point directories<br>  -i, --import-old-mounts copy  old registry mount table mounts into the current<br>                                mount areas<br>  -p, --show-cygdrive-prefix    show user and/or system cygdrive path prefix<br>


  -s, --system                  add mount point to system-wide registry location<br>  -t, --text       (default)    text files get \r\n line endings<br>  -u, --user       (default)    add mount point to user registry location<br>


  -x, --executable              treat all files under mount point as executables<br>  -X, --cygwin-executable       treat all files under mount point as cygwin<br>                                executables<br>  -m, --mount-commands          write mount commands to replace user and<br>


                                system mount points and cygdrive prefixes<br clear="all"><div><div><div><div><br>-- <br>Giles<br><a href="http://www.gilesorr.com/" target="_blank">http://www.gilesorr.com/</a><br><a href="mailto:gilesorr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" target="_blank">gilesorr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a>
</div></div></div></div></div></div>