Skip to content

Inconsistent directory permissions for ~/.docker directory #2727

@thaJeztah

Description

@thaJeztah

Opening as a tracking issue, following the discussion on moby/buildkit#1660 (comment), which highlighted that depending on which path in the code is taken, permissions on the ~/.docker may be either 0700 or 0755;

if err := os.MkdirAll(dir, 0700); err != nil {

if err := os.MkdirAll(contextDir, 0755); err != nil {

The second example was added later, so should probably be updated to match the former, although less restrictive permissions would likely not be a problem in most cases as this directory (in the default case) will be inside the user's home directory, which should already be inaccessible for other users.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions