RHEL/CentOS 7: Problem with systemctl --root= option
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: Code:
[root@server-02 system]# systemctl --root=/myservices/mds start xyz.service 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. |
The message tells why it is not working. Try sudo.
|
@syg00 I am running the command as root
|
Quote:
EDIT: From the man page: Code:
--root= |
@berndbausch Still doesn't work
|
Now I am getting this:
Code:
[root@server-02 ~]# systemctl --root=/myservices/mds enable xyz.service |
All times are GMT -5. The time now is 05:53 AM. |