Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5978 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am working my way through the FileMaker training series, and I can't seem to get a .sh script to execute on a schedule.

It runs just fine when I run it from the terminal, manually, but when I select it to be scheduled, it doesn't appear to run, even though it sends an email saying it was run successfully.

I have given my .sh file executable permission, and the first line in my file says #!/bin/sh.

Any idea what I could be doing wrong?

Thanks..

Posted

You could try setting permissions so the script is owned by "fmserver" and is in group "fmsadmin."

Posted

Get Info in the Finder and show the Details under Ownership & Permissions.

Posted

I can view "Sharing & Permissions" under the Get Info, which lists the users and the privileges of each of the users, but I don't see a way to assign the file to a group and to change its ownership. How do I do that?

Posted

The advice you were given is for 10.4 -- things are slightly different in 10.5.

In 10.5, click the + button at the bottom and add a new group to the file -- you should see fmsadmin as a group choice. then, give read & write permission to it. close the get info window, and re-opent it to check that the changes "stuck" (sometimes they don't, I think it's a mac os bug)

Posted

I don't see an fsadmin group/user - I just see "Administrators" and then myself in the list!

I gave the Administrators group read/write permission, to see if that would help, but the script still doesn't run.

Posted

Are you making these changes on the machine which has FMServer installed? If not, that may be why the group is missing?

Try this from the terminal:


 id -p fmserver





it should list something like 



uid fmserver

groups fmsadmin daemon





You might be able to use the command line tool chown, as in



sudo chown :fmsadmin myFileName.sh

Posted

The id tool returned what you said. I do have FileMaker Server installed on the machine where the script is located. I did the chmod command exactly as you have shown, and then tried to run the script through FileMaker Server and it still didn't work.

Although I did notice that fmsadmin was now added as one with permissions to read/write on the file, after I did the chmod.

Posted (edited)

Replace your script with a simple one such as


#!/bin/sh

echo "### Filemaker Shell Script Running!"

And see if this runs.

You can see the output in /Library/FileMaker Server/Logs/stdout

If this works, then test it with your script and see what the problem is. Put in lots of echo commands if you need so you can see where the script fails.

Edited by Guest
typo on line 1
Posted

Okay, the last thing that I did, chown, I did on the wrong file (woops!!!). When I did it on the right file, and then ran the script in FileMaker Server, it WORKED.

Thank you everyone for your help.

Posted

Glad you got it sorted out. Thanks for jumping in, xochi, I learned something too!

This topic is 5978 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.