Skip to content

File permissions on lock files (#11324) #12665

@Lalufu

Description

@Lalufu

Question

In #11324 (addressed in #11328) there was a complaint about a lock file error in case a uv environment was created by one user, but then used by another. The fix for this was to create the lock files in question with 0o777 permissions, ignoring any user umask. While this fixes the problem, it now leaves world writable files on the file system, which isn't great practice, either.
What I'm not understanding from the original issue, and what I'd like some clarification on, are the consequences of not being able to acquire the lock file in question. If this lock file is taken to prevent concurrent changes to other files, in the case presented this would not be possible in any case, as all other files are also owned by a different user? What does taking the lock file guard? What could happen if uv run continued without having taken the lock in this case?

Platform

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionAsking for clarification or support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions