Skip to content

Commit

Permalink
Replace BUILTIN\Users by SID
Browse files Browse the repository at this point in the history
BUILTIN\Users only work on English Windows
  • Loading branch information
larskanis committed Dec 18, 2024
1 parent 1e58561 commit 9ad5871
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recipes/unpack/50-install-msys-packages.rake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ file ruby_exe => [self.repo_added] do
# For some reason pacman-5.2.1 generates package files, that prohibit changing files after installation.
# Resetting the permissions the hard way fixes this, so that we can touch ruby.exe .
sh "takeown /R /F \"#{unpackdir.gsub("/","\\")}\" >NUL"
sh "icacls \"#{unpackdir.gsub("/","\\")}\" /inheritance:r /grant BUILTIN\\Users:F /T /Q"
# Set owner to BUILTIN\Users
sh "icacls \"#{unpackdir.gsub("/","\\")}\" /inheritance:r /grant \"*S-1-5-32-545:F\" /T /Q"
rescue => err
$stderr.puts "ignoring error while adjusting permissions: #{err} (#{err.class})"
end
Expand Down

0 comments on commit 9ad5871

Please sign in to comment.