You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When starting a service with sudo privileges, the service's active state will be shown correctly with sudo privileges only, but not with user privileges.
Example: consider the apache2 service.
At first it is not running yet, no matter if we check with or without sudo:
vagrant@cb9578505fac:/$ systemctl status apache2
apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service, disabled)
Active: inactive (dead)
vagrant@cb9578505fac:/$ sudo systemctl status apache2
apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service, disabled)
Active: inactive (dead)
Then, when "apache2" is started, it shows up as "active (running)" when checked with sudo permissions:
vagrant@cb9578505fac:/$ sudo systemctl start apache2
vagrant@cb9578505fac:/$ sudo systemctl status apache2
apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service, disabled)
Active: active (running)
However, when checking the status without sudo permissions, it shows up as "inactive (dead)":
vagrant@cb9578505fac:/$ systemctl status apache2
apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service, disabled)
Active: inactive (dead)
Even though, checking again with sudo permissions, it is still "active (running)":
vagrant@cb9578505fac:/$ sudo systemctl status apache2
apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service, disabled)
Active: active (running)
Is this intended behaviour, or a bug?
At least on my Ubuntu system (with original systemctl) you can successfully query the correct status of the services, no matter if they were started with sudo privileges or not...
The text was updated successfully, but these errors were encountered:
When starting a service with sudo privileges, the service's active state will be shown correctly with sudo privileges only, but not with user privileges.
Example: consider the
apache2
service.At first it is not running yet, no matter if we check with or without sudo:
Then, when "apache2" is started, it shows up as "active (running)" when checked with sudo permissions:
However, when checking the status without sudo permissions, it shows up as "inactive (dead)":
Even though, checking again with sudo permissions, it is still "active (running)":
Is this intended behaviour, or a bug?
At least on my Ubuntu system (with original systemctl) you can successfully query the correct status of the services, no matter if they were started with sudo privileges or not...
The text was updated successfully, but these errors were encountered: