Skip to content

Use Bitwise AND to set permissions in utils/unpacking.py #8179

@deveshks

Description

@deveshks

Originally triaged in #8164

We are using 0o777 - current_umask() to set file permissions, but we should be using a Bitwise AND (0o777 & ~current_umask())

os.chmod(fn, (0o777 - current_umask() | 0o111))

os.chmod(path, (0o777 - current_umask() | 0o111))

We would also want to move the two os.chmod calls into a helper function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions