private static void FixPermissions(string directory) { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { // Reset everything to user readable/writeable and group and world readable. FS.ChmodAll(directory, "*", "644"); // Now make things that should be executable, executable. FS.FixModeFlags(directory); } }