Skip to content

Inconsistent directory permissions for ~/.docker directory #2727

Open

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.

Activity

  1. thaJeztah commented on Sep 16, 2020

    @thaJeztah
    MemberAuthor
  2. chris-crone commented on Sep 16, 2020

    @chris-crone
    Member

    I don't see a reason for the context store being more permissive than the .docker directory. Maybe @simonferquel had something specific in mind?

  3. simonferquel commented on Sep 17, 2020

    @simonferquel
    Contributor

    No specifics in mind. Tls materials dirs was also created with 0700 as well I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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