This is probably something silly due to my inexperience with Debian, but the command:

sudo /opt/sqlanywhere17/bin64/dbsvc -as -t network -s manual -w demosvc -n demo17 /vagrant/DBL/demo.db
SQL Anywhere Service Utility
You do not have permission to manage services.

The documentation says "You must have permissions on the /etc/init.d directory to create, edit, or delete services.", so I changed the permissions setting on /etc/init.d with:

sudo chmod 777 /etc/init.d
However I still get the error "You do not have permission to manage services.".

I'm running Debian 8 and SA

I know that Debian is using systemd to manage services, so tried looking through the dbsvc script (and those it calls) and found a script dbsvc_iface_systemd that seems to be initiating the error message when there are no write permissions on a directory /usr/lib/systemd/system, which does not exist on my system. For a lark, I created that directory and tried again. This time it seems to have created the service, but named it SA_.service (I would have expected SA_demosvc.service - the docs say "The naming convention for the service is SA_service-name"). In any case, if I try to start the service with

sudo systemctl start SA_.service
it fails and the journal entries go on about "Failed at step EXEC spawning /usr/bin/rm: No such file or directory" and by now I'm way over my head.

I have created and run SA services many times under Ubuntu with no problems, so this is a bit of a mystery. Any hints on where I've gone wrong, or what I could try next?


asked 11 Aug '16, 17:45

Terry%20Wilkinson's gravatar image

Terry Wilkinson
accept rate: 25%

edited 11 Aug '16, 18:13

What I can tell you from my experience, these scripts do not support linux systems well. In my case, dbsvc creates SA_.service in RHEL as well.
I am using Debian 7.10 and dbsvc created SA_xxxx correctly. My suggestion is to create the systemd service manually:

(12 Aug '16, 04:05) Vlad

This would be a second posting that indicates there is a service naming problem and that needs to be looked into in more detail.

Since Vlad has it working on his Debian 7.10 it would seem to be specific to Debian 8 and CentOS 7 ... which could be the specific shell you are running.

Can you force this be used in Bash and see what that produces on your side?

(12 Aug '16, 13:16) Nick Elson S...

Ok, I got it to work by making the following changes to the distribution scripts.

#1: in the file /dbsvc_scripts/, in the function escape(), I changed

systemd-escape "$i"
systemd-escape "$1"
This seems to fix the problem with the service name only being SA_.service (rather than something like SA_demosvc.service) and I imagine it might work on Vlad mmellon's system, or any installation that uses systemd.

#2: in the file /dbsvc_scripts/dbsvd_iface_systemd, in the function dbsvc_iface_init_systemd(), I changed

This seems to put the service script in the right place.

#3: in the file /dbsvc_scripts/dbsvd_iface_systemd, in the function dbsvc_iface_create_systemd(), I changed



This provides the correct path to the rm command.

NOTE: My changes #2 and #3 may only apply to Debian 8 systems - I suspect they might break the script on others :-(.

permanent link

answered 12 Aug '16, 14:57

Terry%20Wilkinson's gravatar image

Terry Wilkinson
accept rate: 25%

edited 12 Aug '16, 19:34

Thanks for sharing Terry. This should help others ... and will be helpful for planning future platform support.

(12 Aug '16, 18:47) Nick Elson S...
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 11 Aug '16, 17:45

question was seen: 2,362 times

last updated: 12 Aug '16, 19:34