IdealData Posted June 9, 2010 Posted June 9, 2010 I'm trying to get FMServer 11 to execute SYSTEM SCRIPTS on Mac OS X 10.6.3. In the first instance I can get simple commands to execute, such as 'ls' without problem, but what I really want to do is fire up a separate database and use an installed FileMaker Pro 11 to "save records as PDF" - this is an option not available within FMServer. My simple scripts is: #!/bin/bash open '/users/stagebase/documents/file.fp7' which execute correctly when initiated from a terminal session started from the Finder. I have applied the changes to the /etc/sudoers file as recommended by the FMS Admin Console help, so that the script can execute under a local system account. The changes are: Host_Alias FMSHOST = yourhostname Defaults:fmserver targetpw, timestamp_timeout=0, passwd_tries=1 fmserver FMSHOST = (ALL) /Library/FileMaker Server/Data/Scripts/*, /bin/kill and I substituted "yourhostname" with the real hostnmame as determined from the hostname command. When the script is executed the following log entries are generated: 2010-06-09 09:51:00 Server Events Information Schedule "BashTest" running. 2010-06-09 09:51:00 Server Events Information Schedule "BashTest" has started system script "BashTest" with process ID 27732 using account "stagebase". 2010-06-09 09:51:00 Server Events Information Schedule "BashTest" aborted; aborted by user. What's wrong with my setup? Is this even possible? Many thanks.
Vaughan Posted June 9, 2010 Posted June 9, 2010 Why not use chron for this? A real user would have to logged-in for a fmp database to be opened.
IdealData Posted June 9, 2010 Author Posted June 9, 2010 Thanks Vaughan I have my FMServer permanently logged in so it's not a problem to use cron - but still I ask, why won't the system script execute to completion? I should have mentioned that when I said the 'ls' command executed I cannot of course visualise it, but the FM log said all okay. When I tried 'ls > file' I get a failure.
Wim Decorte Posted June 11, 2010 Posted June 11, 2010 did you specify alternate credentials for your test "ls" script? If not then the "> file" would file if it is asked to produce the file somewhere that the fmsadmin user has no write privileges to. You can try specifying the FMS documents folder in that case. As to what you're trying to achieve in general: I doubt it will work. It's really not a server's role to invoke user UI applications on its own box. And leaving your machine with a user logged in a bad idea from the security perspective. You're probably better off with a dedicated FMP robot machine, or a CWP solution that can use a PDF library.
El_Pablo Posted August 5, 2010 Posted August 5, 2010 I tumble on this thread looking for help in a Perl script. Does someone know how to mount a smb folder with the fmserver user? The smb folder is on a Windows server linked to an active directory. I tested my script using an account in the AD, but since fmserver is not member of the AD, the script doesn't work.
Recommended Posts
This topic is 5484 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 accountSign in
Already have an account? Sign in here.
Sign In Now