Skip to content

Modify /var/log/mongodb directory perms to support arbitrary user IDs #271

@ron1

Description

@ron1

For an image to support running as an arbitrary user, directories and files that may be written to by processes in the image should be owned by the root group and be read/writable by that group.

Add the following to the Dockerfile to set the directory permissions for /var/log/mongodb to allow users in the root group to create files in that directory in the built image:

RUN chgrp 0 /var/log/mongodb &&
chmod g=u /var/log/mongodb

Currently, the directory is created with the following permissions:

$ ls -al /var/log/mongodb
total 0
drwxr-xr-x. 2 mongodb mongodb 6 Apr 30 19:15 .
drwxr-xr-x. 1 root root 48 Apr 30 19:15 ..
$

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions