Skip to content

Always set owner read bit for executable files - #348

Open
ahmojo wants to merge 1 commit into
pypa:mainfrom
ahmojo:fix/140-owner-read-bit
Open

Always set owner read bit for executable files#348
ahmojo wants to merge 1 commit into
pypa:mainfrom
ahmojo:fix/140-owner-read-bit

Conversation

@ahmojo

@ahmojo ahmojo commented Jul 5, 2026

Copy link
Copy Markdown

Summary

Fixes executable file permissions with restrictive umasks.

What changed

  • Ensure make_file_executable() always sets the owner read bit.
  • Add regression coverage for typical and restrictive umask values.
  • No new dependencies.

Why

With a restrictive umask such as 0o777, executable files were chmodded to 0o111, leaving the owner unable to read the file. This keeps the existing executable-bit behavior while ensuring owner read permission is present.

Tests

  • uvx nox -s test-3.14 -- --no-cov tests/test_utils.py -k MakeFileExecutable
  • WSL POSIX smoke with real os.umask(0o777) produced 0o511
  • uvx nox -s test-3.14
  • uvx 'nox[pbs]' -s lint

Closes #140

PNHD

This comment was marked as spam.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Always set owner's read bit, in files written

2 participants