S
S
Sergey Doniy2017-11-02 23:42:33
PHP
Sergey Doniy, 2017-11-02 23:42:33

Why does php-fpm "setugid() which is not allowed" error occur?

OS: Mac OS X 10.13.1 High Sierra
Nginx: 1.13.6
Php version: 7.0.25
Simple scripts work fine, fpm works, but most of it crashes
In nginx logs:

2017/11/02 21:18:27 [error] 88408#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: local.dev, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/opt/local/var/run/php-fpm56.socket:", host: "local.dev"

In php-fpm logs:
WARNING: [pool www] child 88423 said into stderr: "2017-11-02 21:39:23.889 php-fpm56[88423:590685] The application with bundle ID (null) is running setugid(), which is not allowed."

Changed user in nginx & php-fpm:
nginx.conf:
user  user admin;
....
upstream php70 {
    server unix:/opt/local/var/run/php-fpm70.socket;
}

host config:
server {
  listen       80;
  server_name  local.dev;
  location / {
    root   /kate_projects/test-serv;
    index  index.php;
  }
  location ~ \.php$ {
      root           /kate_projects/test-serv;
      fastcgi_pass   php70;
      include        fastcgi.conf;
  }
}

php fpm settings:
user = user
group = admin
listen.owner = user
listen.group = admin
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question