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