Skip to content

Permission denied on creating /var/run/apache2/apache2.pid #743

@rcdailey

Description

@rcdailey

Using the nextcloud:latest docker image, which is based on php:7.2-apache-stretch, I get these errors:

[Sun Nov 11 10:36:55.584958 2018] [core:error] [pid 1] (13)Permission denied: AH00099: could not create /var/run/apache2/apache2.pid
[Sun Nov 11 10:36:55.584972 2018] [core:error] [pid 1] AH00100: apache2: could not log pid to file /var/run/apache2/apache2.pid

The relevant docker compose is:

  nextcloud:
    image: nextcloud
    restart: always
    user: $UID:$GID
    sysctls:
      - net.ipv4.ip_unprivileged_port_start=0
    environment:
      - APACHE_RUN_USER=#$UID
      - APACHE_RUN_GROUP=#$GID

How can I run apache using a specified user?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions