Remote iOS Packaging - Manifest File Permissions Wrong

Not a solution, but my workaround is this:

// For clean builds, copy a blank file to the Remote Manifest path and fix its files permissions
def manifestPath = "${scmPath}\\project\\Intermediate\\Remote\\Project\\IOS\\Development"
dir(manifestPath)
{
    bat "IF NOT EXIST Manifest.xml COPY NUL Manifest.xml"
    bat "icacls Manifest.xml /q /c /t /reset"
}

// For IOS, permissions from the mac build node need to be fixed so commands have to be executed in parts
bat "${runUAT} BuildCookRun -project=\"${scmPath}\\project\\Project.uproject\" -${params.Platform} -clientconfig=${params.Configuration} -clean -build -cook -skipstage -unattended"

bat "icacls \"${scmPath}\\project\\Binaries\\*\" /q /c /t /reset"

bat "${runUAT} BuildCookRun -project=\"${scmPath}\\project\\Project.uproject\" -${params.Platform} -clientconfig=${params.Configuration} -cook -stage -package -signed -unattended"

Essentially, for clean builds, I need to create the file beforehand, set the permissions, and then when UAT replaces it from the remote mac build node, it preserves them and can access the file. Then breaking the build process into two phases, fixing the permissions on the downloaded binaries between the two, resolves the rest of the issue.

Honestly, I haven’t dived into this too much but I’m guessing the EC2 Administrator user isn’t recognized by my VPC’s AD properly and having issues setting the correct permissions on download. Legitimate users have no issues using the mac build node for their local compilations so that is my likely guess. What I have works now though, so when I have time I may poke at it more to find something cleaner.