{"action":"opened","issue":{"url":"https://api.github.com/repos/harmon25/banana-panel/issues/1","labels_url":"https://api.github.com/repos/harmon25/banana-panel/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/harmon25/banana-panel/issues/1/comments","events_url":"https://api.github.com/repos/harmon25/banana-panel/issues/1/events","html_url":"https://github.com/harmon25/banana-panel/issues/1","id":103268462,"number":1,"title":"Some service status are reported wrong","user":{"login":"IzzySoft","id":6781438,"avatar_url":"https://avatars.githubusercontent.com/u/6781438?v=3","gravatar_id":"","url":"https://api.github.com/users/IzzySoft","html_url":"https://github.com/IzzySoft","followers_url":"https://api.github.com/users/IzzySoft/followers","following_url":"https://api.github.com/users/IzzySoft/following{/other_user}","gists_url":"https://api.github.com/users/IzzySoft/gists{/gist_id}","starred_url":"https://api.github.com/users/IzzySoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IzzySoft/subscriptions","organizations_url":"https://api.github.com/users/IzzySoft/orgs","repos_url":"https://api.github.com/users/IzzySoft/repos","events_url":"https://api.github.com/users/IzzySoft/events{/privacy}","received_events_url":"https://api.github.com/users/IzzySoft/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-26T13:20:44Z","updated_at":"2015-08-26T13:20:44Z","closed_at":null,"body":"First, thanks for this nice panel! Just installed it and started looking into it – but found some strange behavior with some services reporting the wrong status:\r\n\r\n    root# /usr/sbin/service --status-all\r\n     [ + ]  amavis\r\n     [ + ]  apache2\r\n     [ + ]  clamav-daemon\r\n     [ + ]  clamav-freshclam\r\n\r\nPanel reports Apache2 running, but Amavis stopped. clamav-daemon started, but clamav-freshclam stopped. I've tried some debugging, and indeed it seems the system call returns wrong data:\r\n\r\n    [0] =>  [ - ]  amavis\r\n    [1] =>  [ + ]  apache2\r\n\r\nCould it be the web server doesn't have enough privileges to list all services correctly? I can reproduce this easily: `/usr/sbin/service --status-all` returns the correct values (as shown above), but `sudo -u www-data /usr/sbin/service --status-all` gives wrong results for some services.\r\n\r\nAny idea on how to fix that?\r\n\r\n**Workaround:** Placing a file `/etc/suduers.d/user-alias` with the content\r\n\r\n    www-data ALL = NOPASSWD: /usr/sbin/service --status-all\r\n\r\nand changing line 12 in `lib/services.php` to\r\n\r\n    $servicesArray = $ssh->exec_noauth('sudo /usr/sbin/service --status-all');\r\n\r\ndid it for me."}}