use language-independent SID for Windows Users group permission

This commit is contained in:
doblon8 2025-10-21 08:59:20 +02:00
parent 092267339a
commit 8be8c06b36
No known key found for this signature in database
GPG key ID: 0D31305E7D2ECBBA

View file

@ -285,7 +285,8 @@ if(os.linux) {
tasks.register('addUserWritePermission', Exec) {
if(os.windows) {
commandLine 'icacls', "$buildDir\\image\\legal", '/grant', 'Users:(OI)(CI)F', '/T'
def usersGroup = '*S-1-5-32-545' // Windows "Users" group SID (language-independent)
commandLine 'icacls', "$buildDir\\image\\legal", '/grant', "${usersGroup}:(OI)(CI)F", '/T'
} else {
commandLine 'chmod', '-R', 'u+w', "$buildDir/image/legal"
}