Solved the 'command' service


Verified User
Jul 31, 2022
Hello to all

I'm not going to hide it, I bought a dedicated server from ovh, I did the installation of the OS and after install, the "service" command not accessible but readable when you go in the /sbin/service directory

Does this make sense to you?

No doesn't make sense. The service binary in /sbin/service should be chmod 755.

What OS distro and version?
So what's the problem then. You say it's readable, but it shows it's executable.

If you issue the command
service exim status
what error do you get?
I will add a bit, a help if one day, someone has already had this problem.
I have added this to
what I added
Now, service, adduser, useradd, all /sbin commands work.
It can be used that way too indeed.
But it's a workaround. I'm wondering as to why it's maybe not in the path to begin with.

Try this command to see if you have a path if you encounter this issue again on a server:
echo $PATH

If it's empty, then the OS has missed it during install. Normally it's present in the /etc/profile file if I'm not mistaken.
So question is why the /etc/profile file is either missing or does not contain the path as should be.
Might also be a Debian or OVH image issue, I'm not sure as I don't work with either.

But this thread is good to know like you said, also for people encountering the issue later on.
Of course, that's why I did it, because according to the instructions of their technical support, you are the master of your server