6 Replies Latest reply on Jun 13, 2013 11:14 PM by Malcolm

    Mac connection to Windows Server breaking things in filemaker

    PeterWindle

      Hello all,

      I know this is not strictly a filemaker problem, but I have encountered this problem a few times with a client of mine...

       

      They are in a mixed environment, mac & PC connecting to a shared volume on a windows server.

       

      Sometimes, when a mac connects to the server, there is a problem with filemaker using filepaths to images stored on the server as a reference and the reason is due to the way the volume name is addressed when the Mac connects.

       

      the shared volume name is Images_new

      sometimes (yes, only sometimes), when you connect from a Mac, the volume connects perfectly, everything appears perfectly, however, if you get info on any of the files on that volume, the filepath shows as "/Volumes/Images_new -1" - which in turns breaks a lot of scripts I have that use the filepath "/Volumes/Images_new",

       

      I know there are ways around this, but does anyone know what this indicates? What does the "-1" mean? Can it be avoided?

       

      I am using the file paths with Base Elements plugins, which don't seem to work if you use an IP address to reference the path, so that makes it even more interesting, either way, I would like to know waht this means, anyone....?

        • 1. Re: Mac connection to Windows Server breaking things in filemaker
          robwoof

          Hi Peter,

          I'm not sure there is any foolproof way to avoid this, but I can shed some light on what is going on.

          On Mac OS X, the boot volume is identified as "/". Every other volume, whether external (USB/FireWire/Thunderbolt) or network (AFP, SMB, whatever) is referred to as an entry in "/Volumes". If you have (for example) two external USB drives called "External", the first one you plug in will be called "/Volumes/External", and the second wll be "/Volumes/External-1" and so on.

          Sometimes the OS loses track of what has been connected and disconnected. As a result, it may lose connection with a network share but not update /Volumes. So when you reconnect, or a script initiates a reconnection, it treats the new connection as a separate item. Since it has the same name as something it thinks is already connected, the new connection gets the -1 suffix.

          So I can't help you as to what trioggers it, but that at least should (in part) explain what is going on.

          There are ways you can use AppleScript to do connecting and disconnecting of network shares, and you can probably use terminal commands to mount or unmount as well.

          HTH

          Rob

           

          Edit: corrected spelling

          • 2. Re: Mac connection to Windows Server breaking things in filemaker
            PeterWindle

            rob, Thanks for this info, it's very helpful!

             

             

            I would really like to find a way of avoiding this problem. I'm fairly sure that the last time I saw this happen, I disconnected and re-connected, but it still showed the same thing, I'm farily sure I re-started as well, so I'm not so sure a simple disconnect/reconnect would resolve the problem...???

             

            More recently, I experienced this problem, removed a whole bunch of cache files, then restarted my mac, problem dissapeared ! I suppose if there is a cache file that stores the /Volumes, it could be killed off, right? Perhaps if this is deleted, it may resolve the problem?

             

            I would imagine that a delete cache and then disconnect/reconnect may work, as long as I don't have to restart, then I'm happy with that, mind you, that would mean building an Applescript as well (yuk) and REALLY, there should be an easier way!

             

            any suggestions are most welcomed!

            • 3. Re: Mac connection to Windows Server breaking things in filemaker
              Malcolm

              I would really like to find a way of avoiding this problem.

               

              From the command line:

               

              sudo diskutil umount force /Volumes/FooBar

               

              malcolm

              • 4. Re: Mac connection to Windows Server breaking things in filemaker
                PeterWindle

                Malcolm, thanks for the unmount, I'm not a unix guru, is there a way of sending the password with the command and what is the command to re-mount the server? I will need to make it available to a filemaker user, so I will need to build the whole process into one simple step.

                • 5. Re: Mac connection to Windows Server breaking things in filemaker
                  robwoof

                  For reconnecting, you could use the Perform Applescript script step, using the following template:

                   

                  tell application "Finder" to open location "smb://<username>:<password>@<serveraddress>/<share>"

                   

                  Use a text calculation if you want to use individual user logins.

                   

                  HTH

                  Rob

                  • 6. Re: Mac connection to Windows Server breaking things in filemaker
                    Malcolm

                    Malcolm, thanks for the unmount, I'm not a unix guru, is there a way of sending the password with the command and what is the command to re-mount the server? I will need to make it available to a filemaker user, so I will need to build the whole process into one simple step.

                     

                    The diskutil command may not require you to use sudo. I guess that depends on the way the volume has been mounted.

                     

                    It probably is possible (because we're on the command line)  to bypass the password requirements for sudo but I imagine that it would be extremely difficult.

                     

                    Re-mounting is possible: diskutil mount device. The trick is that you need to be able to specify the device name/path/id.

                     

                    Malcolm