After poking around a bit, it seems that all that is needed to implement a fix is to add the following code in "Filesystem::copy_file": std::filesystem::copy_file(from, to, options); // Already there std::filesystem::permissions(to, std::filesystem::perms::owner_write, std::filesystem::per...
I still think that this should instead be fixed in Factorio: on *Nix systems, Factorio should copy, chmod, then modify the files instead of just copying and modifying.
I have a marginally better hacky workaround. This mounts a filesystem that does not follow Unix permissions (Fat32) and uses that for the temp directory. Remove the last three lines of code (the factorio command onwards) to make it a "one-time" thing. #!/usr/bin/env bash set -e FACTORIO_CO...