3 Replies Latest reply on Feb 15, 2011 8:54 AM by TSBear

    System Level Script Schedule not working - aborted by user

    tineo

      Title

      System Level Script Schedule not working - aborted by user

      Your post

      Hello,

      Running two servers (Mac OS X 10.6.4 and 10.6.6 Server) one with FMS 10 and one with FMS 11 - both up-to-date.

      Trying to create a schedule to execute a shell script (very simple test script for now, just doing "touch test.txt").

      It starts the schedule and seems to try to execute the script, then the log shows "aborted by user" and after verification the script has not run. In FMS 11 I specified to execute the script by a user with admin priviledges. In FMS 10 there's no option to execute the script as such or such user. The script has execute permissions and runs fine from a console.

      Log shows:

      Schedule "test" running

      Schedule "test" has started system script "test.sh" with process ID 1322 using account "serveradmin".

      Schedule "test" aborted; aborted by user.

      Schedule "test" end date has passed, schedule disabled

      So i'm getting the same problem on both servers. Anyone can help ?

      Thanks in advance,

      Cedric Tineo

        • 1. Re: System Level Script Schedule not working - aborted by user

          Cedric Tineo:

          Thanks for posting!

          It sounds like a possible permissions issue. Could you run the following commands in terminal and post the results?

          ls -l /Library/FileMaker\ Server/Data/Scripts/<name of bash script>

          ls -l <path to test file>/test.txt

          Also, is that the exact statement you're running within your script, "touch test.txt"? Try referring to test.txt using the full file path.

          TSBear

          FileMaker, Inc.

          • 2. Re: System Level Script Schedule not working - aborted by user
            tineo

            Here is the result of the ls -la :

            auer01:Scripts serveradmin$ pwd
            /Library/FileMaker Server/Data/Scripts
            auer01:Scripts serveradmin$ ls -la
            total 8
            drwxrwxr-x  3 fmserver     fmsadmin  102 Feb 14 11:41 .
            drwxrwxr-x@ 7 fmserver     fmsadmin  238 Feb  4  2010 ..
            -rwxrwxrwx@ 1 serveradmin  admin      28 Feb 14 11:41 test.sh

            did "chmod -x test.sh" and "chmod 777 test.sh" just to be sure

            I changed the script to touch /path/file.txt - and it works now - it was a permission issue. By default with just "touch text.txt" it was attempting to create that file at / and permissions wouldn't allow it. 

            In FMS 10 - what user was it running the script as ??? fmsadmin, right ? Can it be changed ? (I know in FMS 11 we can specify in the scheduler what user to run the script as).

            I tried to modify the script to do what it's intended to do - move things around - and again it failed when run from the scheduler, so same permissions issue. Is there anyway to run it with a higher priviledge from the scheduler of FMS 10 ?

            New script:

            #!/bin/bash
            touch /Shared\ Items/Fondation/file.txt

            mv /Shared\ Items/Fondation/file.txt /Library/WebApps/auerphoto/public/images

            Thanks for your help !

            Cedric Tineo

            • 3. Re: System Level Script Schedule not working - aborted by user

              Cedric Tineo:

              There's no way to run a script as a different user with FileMaker Server 10 but setting the appropriate permissions for fmserver on every folder you're touching should work fine.

              In regards to the faililng move statement, my guess is that the serveradmin user doesn't have write privileges on /Library/WebApps/auerphoto/public/images. 

              TSBear

              FileMaker, Inc.