Skip to content

Set executable permissions at build time instead of runtime#109

Open
embetten wants to merge 1 commit intomasterfrom
users/embetten/fix-chmod-issue-99
Open

Set executable permissions at build time instead of runtime#109
embetten wants to merge 1 commit intomasterfrom
users/embetten/fix-chmod-issue-99

Conversation

@embetten
Copy link
Copy Markdown
Contributor

@embetten embetten commented Apr 1, 2026

Move os.chmod of CredentialProvider.Microsoft binary from plugin.py (runtime) to setup.py (build time). This ensures the binary is already executable when packaged into the wheel, so restricted users who cannot chmod files they don't own no longer encounter permission errors.

Fixes #99

Move os.chmod of CredentialProvider.Microsoft binary from plugin.py
(runtime) to setup.py (build time). This ensures the binary is already
executable when packaged into the wheel, so restricted users who cannot
chmod files they don't own no longer encounter permission errors.

Fixes #99
)
if os.path.exists(cred_provider_exe):
print("Setting executable permissions on", cred_provider_exe)
os.chmod(cred_provider_exe, 0o755)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the issue, we might want to set to 0o777, do you have an opinion here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was leaning towards keeping 755. The accounts may differ, but I can't think of a supported scenario where everyone needs write access to the executable.

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.

Check tool_path folder permission before running os.chmod(tool_path, 0o755)

2 participants