Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ubuntu 如何以非sudo用户身份运行upstart_Ubuntu_Upstart - Fatal编程技术网

Ubuntu 如何以非sudo用户身份运行upstart

Ubuntu 如何以非sudo用户身份运行upstart,ubuntu,upstart,Ubuntu,Upstart,我有一个uwsgi的新贵,我希望非sudo用户运行uwsgi。在ubuntu服务器14.04中,我有两个用户,user1(有sudo访问权限)和user2(没有sudo访问权限) upstart脚本我有/etc/init/uwsgi.conf: description "uWSGI instance" start on runlevel [2345] stop on runlevel [!2345] exec uwsgi --emperor /etc/uwsgi/vassals --uid

我有一个uwsgi的新贵,我希望非sudo用户运行uwsgi。在ubuntu服务器14.04中,我有两个用户,
user1
(有sudo访问权限)和
user2
(没有sudo访问权限)

upstart脚本我有
/etc/init/uwsgi.conf

description "uWSGI instance"

start on runlevel [2345]
stop on runlevel [!2345]

exec uwsgi --emperor /etc/uwsgi/vassals --uid user1 --gid user2 --post-buffering 1 --env DJANGO_SETTINGS_MODULE=in_accounts.settings.production
我可以运行这个uwsgi.conf作为
sudo restart uwsgi
。但是我想运行与
user2
restart-uwsgi
相同的命令。如果我运行,会出现以下错误:

restart: Rejected send message, 1 matched rules; type="method_call", sender=":1.140" (uid=1001 pid=41623 comm="restart uwsgi ") interface="com.ubuntu.Upstart0_6.Job" member="Restart" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init ")