Jump to content
gczychi

Server Script Error – why?

Recommended Posts

Hi all,

trying to schedule my first system server script and I am getting an error: 

Dec 2, 2016 9:35:00 AM
Server Events
Error
692
Schedule "fms backup to net vol" aborted; system script "fms_BackupScript.sh" returned non-zero status 12.

Running mac OS Sierra

FMS is running with its default user account (fmserver [I guess])

The shell script file works fine when I double click it and has all execute privileges:

 

-rwxr-xr-x@  2 admin     staff     149 Dec  2 09:12 fms_BackupScript.sh

Interesting, when I schedule this script with the admin username and password option, then I get an «Invalid account» error:

Dec 2, 2016 9:54:00 AM
Server Events
Error
732
Schedule "fms backup to net vol" aborted; invalid account name or password.

 

I'm puzzled. Where's the problem?

Thanks for any help!

Gary

 

 

Share this post


Link to post
Share on other sites

From the name of the schedule: are you trying to back up to a remote volume on the network?  Make sure it is mounted and that the default user fmserver/fmsadmin has the right privs to that volume.

Share this post


Link to post
Share on other sites

Thanks, Wim,

the network shares are always mounted and I am adressing it locally: 

/Volumes/Backup/fmserver/Backups/

So, that's not the problem. The shell script works just fine when I double click it.

 

Share this post


Link to post
Share on other sites

Your 'double-click' test is not a valid test because that runs as you, not as the FMS user.

Mounting the remote volume is not enough, the FMS account needs to have the proper rights on that volume.

Share this post


Link to post
Share on other sites

Thanks for the hint, but this is not the problem.

I replaced the sync command with something else and it still doesn't work. It returns the same error:

Here's my script:

#!/bin/bash
# See Info file in /Application/FM Server/…

whoami > /Users/admin/Desktop/user.txt

# rsync -r --delete-after /Library/FileMaker\ Server/Data/Backups /Volumes/Backup/fmserver

and it produces the following error in FM Server:
In «Log Viewer»

Dec 4, 2016 9:30:00 AM
Error
Schedule "fms backup to net vol" aborted; system script "fms_BackupScript.sh" returned non-zero status 12.


In «Schedules»

fms backup to net vol
System Script
Aborted by user

The last message «Aborted by user» might be interesting, but I cannot make anything out of it. 

And, keep in mind, when I set a specific OS X user in FM Server to run the script, I get an «invalid account name or password» error.

 

Edited by gczychi
typo

Share this post


Link to post
Share on other sites

I am not getting through to you it seems.  It does not matter whether you use a remote volume or an internal folder.  The FMS account by default only has read and write privileges to its own folders.

It does not have access to the folder and fileyou are targeting.  That's just the nature of OSX's security.  You'll need to give the FMS account the proper rights to wherever you want it to interact with.

/Users/admin/Desktop/user.txt
  • Like 1

Share this post


Link to post
Share on other sites

You're right. I didn't get it.

So, what I did: I edited the sudoers file again, added the admin user and then within FM Server console, added the user admin to run the script. Now, it looks like this:

##
## User privilege specification
##
root ALL=(ALL) ALL
%admin  ALL=(ALL) ALL
# «admin» for FM Server script usage
admin ALL=(ALL) ALL

…

## FM Server additions
## see: https://localhost:16000/help/en/index.html#page/fms/sched_select_os_script.html
Host_Alias FMSHOST = path.to.router
Defaults:fmserver targetpw, timestamp_timeout=0, passwd_tries=1
fmserver FMSHOST = (ALL) /Library/FileMaker\ Server/Data/Scripts/*, /bin/kill

However, this is a potential security risk, because now, the admin user has sudo privileges.

Better would have been to add my backup directory (/Volumes/Backup/fmserver/) to the allowed directories of fmserver, but I couldn't figure out how to do that.

Thanks again for your help!

Gary

 

Share this post


Link to post
Share on other sites

why not just chmod / chown the target folders to the FMS account?  Much safer than messing with sudoers...

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • By dataclip
      We have a couple of servers running on AWS. As of the middle of last week we suddenly are having connection problems. The server logs mostly lists error 10, sometimes error 51. These customers have poor internet connection, so we have set up a server and a client in the cloud. The users connects to the client through an RDP session. It is a Windows enviroment with one customer using Windows server 12 and FMS 14, the other Windows server 16 and FMS15. We use a seperate AD server to control the RDP access and accounts to the FMP server, clients have no acces to the FMS server.
      I have read previous posts on this issue. I do not think there can be any hardware issue, since the server is hosted with Amazon and both server and client are on an internal network. To be sure I have filed a support request with Amazon as well.
      The strange thing is that the error message sometimes occurs within a minute and then FMP freezes on the user while they are still working in the FM app. It is my understanding that error 10 occurs if the client does not respond to the server ping for 2 pings, so time out for this error should be 125 seconds. 
       

       
      These servers have been running without this issue for a long time now. Any idea why this has suddenly changed and why the error message errors while tghe users is using the FM app?
       
    • By mr_mike
      I'm looking for both guidance and software to assist in FileMaker Change Control.  With over a 100 deployed solutions across multiple servers the process change management from dev > test > production is very labor intensive.  BaseElements helps a lot but it is only one part of the puzzle.  Porting the data from production > test across these solutions and then doing UAT and QA is again, labor intensive.
      How are others handling this?  Is there some software or process documents I'm missing?  I'd welcome any input to this topic.
      Mike
    • By theusualsuspect
      I'm wrapping my head around the Standby Server feature, and there's only one aspect that I can't figure out. I use Webdirect, so I'm forwarding port 80 to the internal ip address assigned to my primary server. If that were to go down, my standby server would take over - but it's assigned a different ip address - so my router's port forwarding rules will still be pointing to the ip address of the primary server. Is this accurate? If so, is there a way around this?
    • By cbum
      For security reasons, my institution is requiring me to migrate my FMS15 solution, currently residing on a MacPro in my office, to the IT data center. Since they do not run MacOS, this includes a migration to a hosted windows server running FMS advanced. I no nothing about windows (eg: what is a hosted win server vs simple win server ???) , so I will be totally dependent on the IT staff knowing what they are doing (and they barely know FM, I narrowly escaped having them try to recreate the solution in Access for $$$$$ ...):
      Current Environment
      ·      FileMaker Server Advanced running on local Mac OS12.12 system.
      ·      RAID-0, Solid State Drives
      ·      8-Core CPU
      ·      32gb RAM
      ·      FileMaker DB is 100gb with additional storage required for temporary files and local DB backups
      Proposed Environment
      ·      Hosted Windows Server running FileMaker Server Advanced
      ·      4-CPU
      ·      16gb RAM
      ·      1tb Storage
       
      I have many questions/concerns, but would appreciate feedback on 2 issues:
      1. Backups: My understanding is that FM is adamant that no backup system can touch a “live” database file, causing potential corruption. FMS has its own internal backup mechanism, and you point it to some external drive / directory etc, where it creates backups that can then be copied/archived by a system process or third party backup system.
      The IT manager I am discussing this with replied the following: "Backups should not be an issue either. We've been using this model on our SQL servers and have not experienced a single issue over many years. They do their backups and we do our own as well."
       
      I don't know what the windows server system is doing for backups, but are the FM warnings about letting other backup systems touch live FM files only for 3rd party SW, and system processes are OK? Any specifics I should communicate to the IT guys? Again, I know nothing about how win or win/server does this.
       
      2. Performance:  I am obviously worried performance will take a hit, if only from networking.
      I am hosting a dozen related files ranging from 1-50 GB, typically 5-10 concurrent local and remote users.
      The proposed environment seems less optimized for DB performance - what are the key parameters I should negotiate on? My current 32gb RAM may well be more than what is needed (I don't use any web or go functions, just straight FM clients), but can I determine from the admin console logs/stats how much is really needed? My request for SSDs was immediately shot down, how much can I get from various RAID configs they may or may not agree to?
       
      Thanks for any feedback - I am so not looking forward to this...
       
    • By vincenzo
      Hello, 
      I have a filemaker server 15 advanced running on windows server 2008r2 in a local LAN network. I want to connect to server with client (filemaker 15 pro). Everything work well in the local LAN but I am unable to access to the database outside the office using internet connection and IP. I just have made the port forwarding setup (5003 and 16000) but no results. Maybe the Windows server need to be opened in some service or funcionality?
      Before of the server I had a simepl windows XP pc running filemaker server 5.5 and it work well also outside the lan.
      Thank you
  • Who Viewed the Topic

    5 members have viewed this topic:
    SupportGuys89  RadioSaigon  liltbrockie  Lee Smith  Mstenquist 
×

Important Information

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