Ask questions"initgroups, operation not permitted" error in apache2-mpm-itk when inside Docker

Description of problem: Apache2 with ITK MPM fails inside a Docker container

docker version:

Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8
OS/Arch (client): linux/amd64
Server version: 1.4.1
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 5bc2ff8

docker info:

Containers: 3
Images: 25
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Dirs: 37
Execution Driver: native-0.2
Kernel Version: 3.13.0-37-generic
Operating System: Ubuntu 14.04.1 LTS
CPUs: 1
Total Memory: 490 MiB
Name: temp-droplet
Debug mode (server): false
Debug mode (client): true
Fds: 24
Goroutines: 22
EventsListeners: 0
Init Path: /usr/bin/docker
Docker Root Dir: /var/lib/docker
WARNING: No swap limit support

uname -a:

Linux temp-droplet 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Environment details: DigitalOcean droplet, Ubuntu 14.04 x64

Follow the steps below:

docker run --rm -t -i ubuntu:14.04 bash
apt-get update
apt-get install apache2 curl 

apache2ctl start
curl http://localhost
# OK

# Switch to ITK
a2dismod mpm_event
apt-get install apache2-mpm-itk
apache2ctl stop
apache2ctl start

curl http://localhost
# Fails with 500 Internal Server Error

cat /var/log/apache2/error.log

[Thu Dec 18 22:23:38.399922 2014] [mpm_itk:warn] [pid 4183] (itkmpm: pid=4183 uid=33, gid=33) itk_post_perdir_config(): initgroups(www-data, 33): Operation not permitted

From what I can see, it cannot decode gid. It does not fail on the host system, fails only inside a container.

Can someone please sort out what is the cause?


Answer questions lordspace

@karimkancel Thanks! It worked for me. How did you find about that capability?

Svetoslav Marinov lordspace Orbisius Canada Awesome entrepreneur working on amazing stuff. Check out
Github User Rank List