Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/348.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/23.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
Python 被Web服务器调用时PySerial权限被拒绝_Python_Django_Permissions_Uwsgi_Cherokee - Fatal编程技术网

Python 被Web服务器调用时PySerial权限被拒绝

Python 被Web服务器调用时PySerial权限被拒绝,python,django,permissions,uwsgi,cherokee,Python,Django,Permissions,Uwsgi,Cherokee,我有一个django应用程序,它连接到服务器上的几个串行设备 此应用程序在Ubuntu 10.04上运行。用户“chero”是web服务器进程的所有者。chero是拨号组的成员 使用开发服务器或pythonshell(以用户chero的身份运行),一切都可以正常工作 Web服务器是cherokee,带有uwsgi(也作为chero运行)。当Web服务器尝试打开串行端口时,我得到:[错误13]权限被拒绝 我已经通过在串行端口打开之前在行中插入以下内容来验证Web服务器是否确实以用户chero的身份

我有一个django应用程序,它连接到服务器上的几个串行设备

此应用程序在Ubuntu 10.04上运行。用户“chero”是web服务器进程的所有者。chero是拨号组的成员

使用开发服务器或pythonshell(以用户chero的身份运行),一切都可以正常工作

Web服务器是cherokee,带有uwsgi(也作为chero运行)。当Web服务器尝试打开串行端口时,我得到:[错误13]权限被拒绝

我已经通过在串行端口打开之前在行中插入以下内容来验证Web服务器是否确实以用户chero的身份运行: raise VALUERROR('user:'+pwd.getpwuid(os.getuid()).pw_name)

在我将/dev/ttyS*上的权限设置为666之后,Web服务器能够打开端口,但这不是一个理想的解决方案

是否有什么原因uwsgi或切诺基会阻止切罗被确认为拨号组的成员