Portage Bay
Portage Bay

File Permissions Error and PSOS

Working together today during our weekly dev meeting, the Portage Bay team ran across a slightly obscure requirements issue that took little bit of time for us to resolve, though once resolved the issue was pretty simple. Maybe this blog post will help someone catch the same problem a little more quickly.

We discovered the issue when noticing a script run via the Perform Script on Server script step (PSOS) was failing. We used the Log Viewer in the FileMaker Server Admin Console to track down the errors. The Log Viewer showed us the error code along with the name of the script step and the line number of the step in the script. Looking up the error codes (200 and 723) we could see they had to do with permissions, the script was unable to edit, add, or delete records in the target file. We checked file access, default logins, privilege groups, and everything seemed to be set up properly.

Schedule "Nightly Sync ABC_Patients - designer 19" scripting error (200) at "ABC_Sync : Nightly Sync ABC_Patients : 134 : Delete All Records".
Schedule "Nightly Sync ABC_Patients - designer 19" scripting error (723) at "ABC_Sync : Nightly Sync ABC_Patients : 136 : Import Records".

The problem turned out to be the fact that the situation was a bit of an unusual one where the file running the PSOS script step had external data sources referencing files that resided on separate hosts. According to the FileMaker documentation, PSOS and scripts running as a server-side schedule require that any referenced files reside on the same host as the file triggering the script. Unfortunately, the error in the server logs doesn’t point you directly to that as the source of the problem, but simply reports a permission error.

Another strange issue we found was that when running the same scripts as a server side scheduled script, the errors did not appear. According to the documentation, this should also display errors and fail, however in testing we discovered it did not. Time permitting, we’ll follow up on this with FileMaker and see if there is a bug, or we’re misunderstanding the documentation.

--Kate Waldhauser & John Newhoff