Koozali.org: home of the SME Server

Problem moving sark.db to new server.

Offline del

  • *
  • 765
  • +0/-0
Problem moving sark.db to new server.
« on: February 04, 2012, 10:56:56 PM »
Hi All,

I have downloaded SME8A18V31128.iso and installed it on some new hardware, I have installed all updates etc. I have copied the following file: /opt/sark/db/sark.db from my old server and copied it to the new server then ran the updater (sh /opt/sark/scripts/update_db.sh)
I logged into the sail pbx and I can see all my voip trunks and extensions and everything seems to work OK but when I add a new extension I get this error when I try to save it:
DBD::SQLite::db do failed: attempt to write a readonly database(EIGHT) at dbdimp.c line 403 at /opt/sark/perl/modules/sark/SarkSubs.pm line 1313.
Note: EIGHT is really 8 but when I put that in it becomes a smiley!!
Any ideas what I may have done wrong?

Regards,
Del
If at first you don't succeed, then sky-diving is not for you!
"Life is like a coin. You can spend it anyway you wish, but you can only spend it once." --Author Unknown

Offline schiehallion

  • 13
  • +0/-0
Re: Problem moving sark.db to new server.
« Reply #1 on: February 09, 2012, 12:34:04 AM »
Haver you fixed this yet?  It sounds like file permissions on sark.db.  Check www has access to the file.  If you use WinSCP, for example, to upload the file it sets the permissions to root.  Select the file and open properties for it.  Set both drop downs to www and it should work.

Offline del

  • *
  • 765
  • +0/-0
Re: Problem moving sark.db to new server.
« Reply #2 on: February 09, 2012, 10:39:59 PM »
Haver you fixed this yet?  It sounds like file permissions on sark.db.  Check www has access to the file.  If you use WinSCP, for example, to upload the file it sets the permissions to root.  Select the file and open properties for it.  Set both drop downs to www and it should work.
I have tried that already and still no luck  :-? I finally decided to re-install SME8B SARK from the ISO and just created all the extensions and trunks from scratch, not too hard as there is only 8 extensions and 4 VoIP trunks, may have been different if there was 50 extensions  :-) I'll try again on a test machine when I get the chance and report back here.
Del
If at first you don't succeed, then sky-diving is not for you!
"Life is like a coin. You can spend it anyway you wish, but you can only spend it once." --Author Unknown

Offline schiehallion

  • 13
  • +0/-0
Re: Problem moving sark.db to new server.
« Reply #3 on: February 09, 2012, 10:46:01 PM »
That's a shame.  I have done this a few times (sometimes it is easier to edit sark.db directly and sometimes from previous versions of SARK) and it is normally OK.  Have even done it on PBXs with well over 100 extensions but then it does always help having a support contract on the commercial ones.

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Problem moving sark.db to new server.
« Reply #4 on: February 26, 2012, 11:55:45 AM »
HI all

Its ownership and perms on the file

it should be www:www and 644

Kind Regards

S