Question

Problem with systemctl --root= option in RHEL/CentOS 7

By imperialguy ·
Tags: Linux
It is my understanding that --root= option in systemctl command is used to explicitly specify an alternate root path to find the service unit files.

On RHEL/CentOS 7, the following error occurs when attempting to use the above mentioned systemctl option:

# systemctl --root=/myservices/mds start xyz.service
Failed to get D-Bus connection: Operation not permitted

So, the idea behind the above command is that I am telling systemctl to find the service called xyz.service in the path /myservices/mds, as opposed to the default search paths like /etc/systemd/system or /run/systemd/system

Any idea why this is not working? If --root is not going to work, is there any other way to specify a custom search path?

Would really appreciate the help.
1 total post (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Answers

Collapse -

You can start any service without using systemctl

by singhbhawani In reply to Problem with systemctl -- ...

You can list all services running on your CentOS system through:
# service --status-all

You can start stop or check status through:
# service start <service-name>
eg; service start httpd

# service stop <service-name>
# service status <service-name>

Back to Linux Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums