nginx ini文件抛出错误(权限被拒绝[core / socket.c第230行])

时间:2017-04-25 14:22:25

标签: python nginx uwsgi ubuntu-16.04

当我们用sudo运行.ini文件时,它工作正常。但是没有sudo就会抛出以下错误,

/home/ubuntu/.local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 29858
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
bind(): Permission denied [core/socket.c line 230]

尝试重新安装uwsgi,但仍然显示相同的错误。 我们为该文件夹设置了777权限,但仍然是同样的错误。

1 个答案:

答案 0 :(得分:2)

编辑:实际上,抱歉,这将是UNIX套接字的权限。您应该检查您的UNIX套接字文件(谁拥有该套接字,该组上的内容,权限,您尝试运行的用户等)。

编辑2:可能相关的uWSGI配置文档 - http://uwsgi-docs.readthedocs.io/en/latest/Options.html?highlight=socket-chmod#chmod-socket

以前的错误答案,它是socket.c尝试访问UNIX套接字的地方:

当尝试绑定到端口时,权限错误在套接字库中(我假设它是端口80)。

bind(): Permission denied [core/socket.c line 230]

端口0-1024仅限于root。 https://unix.stackexchange.com/questions/16564/why-are-the-first-1024-ports-restricted-to-the-root-user-only

相关问题