Skip to content

Set execute bit on bundled Native AOT SDK tool executables - #7297

Merged
mthalman merged 1 commit into
dotnet:mainfrom
mthalman:mthalman/aot-tool-execute-bit
Jun 19, 2026
Merged

mthalman merged 1 commit into
dotnet:mainfrom
mthalman:mthalman/aot-tool-execute-bit

Conversation

@mthalman

Copy link
Copy Markdown
Member

The 'aspnetcoretools' aggregate ships native AOT SDK tool executables (dotnet-dev-certs, dotnet-user-jwts, dotnet-user-secrets). Their nupkg does not carry the Unix execute bit, and ChmodPublishDir's blanket 'chmod 644' clears any bit before the SDK is laid out, so the tools shipped as -rw-r--r-- and failed at runtime with 'Permission denied' (errno 13) when the SDK execs them directly.

Re-add execute permission for these executables in ChmodPublishDir, mirroring the existing Roslyn/MSBuild apphost and dotnet-aot native lib chmods.

The 'aspnetcoretools' aggregate ships native AOT SDK tool executables
(dotnet-dev-certs, dotnet-user-jwts, dotnet-user-secrets). Their nupkg
does not carry the Unix execute bit, and ChmodPublishDir's blanket
'chmod 644' clears any bit before the SDK is laid out, so the tools
shipped as -rw-r--r-- and failed at runtime with 'Permission denied'
(errno 13) when the SDK execs them directly.

Re-add execute permission for these executables in ChmodPublishDir,
mirroring the existing Roslyn/MSBuild apphost and dotnet-aot native
lib chmods.

Co-authored-by: Copilot <[email protected]>
@mthalman
mthalman requested review from a team, DamianEdwards and Copilot June 19, 2026 15:18
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team June 19, 2026 15:18

Copilot AI left a comment

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.

Pull request overview

This PR updates the SDK layout step (in the src/sdk repo content within the VMR) to ensure certain bundled aspnetcoretools native AOT tool executables regain Unix execute permissions after the publish directory is normalized to 644/755.

Changes:

  • Extend ChmodPublishDir to identify aspnetcoretools dotnet-* executables in DotnetTools/aspnetcoretools/** (excluding files with extensions) and chmod 755 them.
  • Add an explanatory comment describing why the execute bit must be re-applied for these tools.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

4 participants