7 Replies Latest reply on Apr 8, 2013 5:01 AM by wimdecorte

    Can't read SMB sharepoint

    IanWilson

      I'm running FileMaker Server Advanced 12 on an Xserve under Snow Leopard Server. I need to access a Windows sharepoint mounted on the server's desktop using SMB so that I can copy over some XML files to the Documents folder in FileMaker Server.

      I use Troi File to read the contents of the sharepoint folder into a list, then loop through it line by line and use Troi File to copy the XML files to the Documents folder. From there I can import into a FileMaker table.

      When I run the script from a server-based FileMaker Pro client, the script works just fine. However, even though I have asked my IT people to give read/write access to user fmserver and group fmsadmin on the sharepoint, the script fails when it is run using a server-side script schedule.

      Does anyone have any idea why this is not working properly? All suggestions gratefully received!

      Ian

        • 1. Re: Can't read SMB sharepoint
          BowdenData

          Hi,

           

          There was a thread similar to this just a few days ago on Windows. Sounds like it might be the same in that the FM Server process does not see/understand a mapped drive. Use UNC file paths to the Windows server in your scripts with the Troi plugin and see what happens.

           

          I don't know what syntax Troi uses, but native Windows UNC would be something like:

           

          \\servername\sharename\foldername\foldername\filename

           

          where foldername\foldername\filename would of course be replaced by your actual file path and filename. Troi may want the slash chars reversed to be unix style forward slashes, but the documentation for the plugin should say this.

           

          HTH.

           

          Doug

          • 2. Re: Can't read SMB sharepoint
            IanWilson

            Thanks Doug. I'll give this a try. The sharepoint is mounted in the Volumes folder, so I don't understand why it can't be seen by Troi file.

             

            Cheers

            Ian

            • 3. Re: Can't read SMB sharepoint
              BowdenData

              Ian,

               

              Agree that it sounds like it should be able to see it. I don't have any relevant experience with a Mac FM server in this regard - just Windows. One thing you can do is in your script, put in some debug logging. Since you can't see what is going on in the server script, you need to write information to a field or fields when it runs.

               

              I am thinking of something like capturing any values returned from Troi when you call various plugin functions, etc. For quick debugging, I usually just use a 'temp' text field and write entries to it, appending new entries to existing ones as needed.

               

              HTH.

               

              Doug

              • 4. Re: Can't read SMB sharepoint
                wimdecorte

                BowdenData wrote:

                 

                Hi,

                 

                There was a thread similar to this just a few days ago on Windows. Sounds like it might be the same in that the FM Server process does not see/understand a mapped drive.

                 

                On Windows, FMS runs under the "local system" account and that one - by design - has no access to anything beyond the local system, so no access to the network resources.

                The easiest way to get around that is to use the FMS feature to specify an OS account to run the OS script schedule in.  That gives you all the control you need.

                • 5. Re: Can't read SMB sharepoint
                  IanWilson

                  Hi Doug

                   

                  I've already done that and I get the $$-5000 error when I try to get a folder listing of the SMB mounted drive.

                   

                  Ian

                  • 6. Re: Can't read SMB sharepoint
                    IanWilson

                    Hi Wim

                     

                    How do I specify the OS account in FMS on The Mac server? I'd like to give it a try.

                     

                    Ian

                    • 7. Re: Can't read SMB sharepoint
                      wimdecorte

                      When you set up the OS script schedule (or probably better in this scenario: a script sequence schedule)  you get to choose the OS account to run the OS script under; it's part of the schedule setup wizard.

                       

                      A script sequence schedule is ideal for this scenario: you can task the OS with copying everything over to the FMS documents folder, so you can leverage any OS account that has the correct privileges.  The FM script that is part of the same sequence will only run if the file move was successful.

                       

                       

                       

                      2013-04-08_07-54-53.png