Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to create a service in ubuntu server, whitch I need to start as a user. Main reason I need to do that is that I need to call it from www(php script).

lets say I got this script called demostart2, and when I start it as user I got this error:

service demostart2 start

start: Rejected send message, 1 matched rules; type="method_call", sender=":1.12" (uid=1000 pid=15085 comm="start demostart2 ") interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")

Is it possible to start service as user? I tried chown that file, but notthing happend. Thank you

share|improve this question

migrated from stackoverflow.com Apr 26 '12 at 12:33

This question came from our site for professional and enthusiast programmers.

1  
As what user did you execute this command? Does something like this sudo -u www-data service demostart2 start give the same error? –  user689893 Apr 1 '12 at 9:50

1 Answer 1

It looks like this server is using an enhanced security model (possibly SELinux, but more likely AppArmour). You would need to update the security profile or disable the Mandatory Access Control.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.