Skip to content

Permissions on file creation does not work as expected when a umask has been set #1640

Closed as not planned

Description

@dubo-dubon-duponey

Repro:

(umask 0000 && bats plan.bats)

Will work.

vs.

(umask 0077 && bats plan.bats)

Will not work (plan/outputs/files default permissions will fail)

Also, when the test fails, the generated file is not removed (different problem, that should be fixed regardless).

The tests clearly expect things to work as one would assume intuitively they would: ​set the perm to exactly the one that was specified - and not the current behavior which is: set the perm to permission & umask, so, I assume the intention of the code was the former?

Looking at the code real quick suggests WriteFile delegates to github.com/moby/buildkit/client/llb so...

Activity

  1. dubo-dubon-duponey commented on Feb 19, 2022

    @dubo-dubon-duponey
    ContributorAuthor

    Thought I would add that I'm happy to fix the tests if the current behavior is expected.
    Ping @aluzzardi

  2. shykes commented on Apr 8, 2022

    @shykes
    Contributor

    Hi guys, I'm trying to understand if this issue still applies in 0.2. Since this seems affected by umask on the client machine, I'm guessing the equivalent core action in 0.2 would be client: filesystem: <path>: write ?

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions