on 2016 Aug 11 6:45 PM
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.dbreturns:
SQL Anywhere Service Utility 17.0.0.1358 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.dHowever I still get the error "You do not have permission to manage services.".
I'm running Debian 8 and SA 17.0.0.1358.
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_.serviceit 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?
Thanks.
Request clarification before answering.
Ok, I got it to work by making the following changes to the distribution scripts.
#1: in the file /dbsvc_scripts/utility.sh
, in the function escape()
, I changed
systemd-escape "$i"to
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 systemd
.
#2: in the file /dbsvc_scripts/dbsvd_iface_systemd
, in the function dbsvc_iface_init_systemd()
, I changed
/usr/lib/systemd/systemto
/lib/systemd/systemThis 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
/usr/bin/rm
to
/bin/rmThis 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 :-(.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
9 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.