Ubuntu: When upstart service is run with user root, it returns Unknown job -
as can see following output(not limited mysql, other service gives similar result), when run service/status sudo, gives correct result, gives 'unknown job' when run directly root.
i googled lot, key words 'status/service' have multiple meaning, found nothing related problem, similar questions answering why 'unknown job' when run 'sudo service...'.
root@ubuntu-user:/etc/init# status mysql status: unknown job: mysql root@ubuntu-user:/etc/init# sudo status mysql mysql stop/waiting root@ubuntu-user:/etc/init# service mysql status status: unknown job: mysql root@ubuntu-user:/etc/init# sudo service mysql status mysql stop/waiting
i have checked strace
, didn't find anything(output long), , think it's restriction of status
, service
, nothing in man page root
or sudo
.
question: why service gives unknown job when runs service without sudo
?
os: ubuntu 14.04 lts
if use upstart v1.4+, try setuid , setgid. more details here:http://upstart.ubuntu.com/cookbook/#run-a-job-as-a-different-user , http://upstart.ubuntu.com/cookbook/#setuid
Comments
Post a Comment