Skip to content

nginx permission denied #50

@chrislaick

Description

@chrislaick

Hello @sylus,

There were two commits (9cc2f08 and 66cc6b3) made in Dec last year that updated the nginx permissions and user:group for nginx directories.

After applying these changes, we're getting a permission denied error in our nginx pod with a CrashLoopBackoff status.

[emerg] 1#1: mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)
nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)

Reverting these commits, back to the following seems to fix it for us:

RUN chgrp -R root /var/cache/nginx /var/run /var/log/nginx && \
    chmod -R 770 /var/cache/nginx /var/run /var/log/nginx

Any ideas on why we need to make this change and how to do it for existing nginx instances?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions