From 4bfbdac9608ad37efa3a8f453a167233dd29da51 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Thu, 27 Nov 2025 11:41:50 -0500 Subject: [PATCH 1/6] unity-cli@v1.6.4 - fix services config file permissions for posix --- package.json | 2 +- src/license-client.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 27bb3c6..ae07168 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rage-against-the-pixel/unity-cli", - "version": "1.6.3", + "version": "1.6.4", "description": "A command line utility for the Unity Game Engine.", "author": "RageAgainstThePixel", "license": "MIT", diff --git a/src/license-client.ts b/src/license-client.ts index f257834..c3ee18e 100644 --- a/src/license-client.ts +++ b/src/license-client.ts @@ -418,6 +418,10 @@ export class LicensingClient { fs.writeFileSync(servicesConfigPath, Buffer.from(options.servicesConfig, 'base64')); } + if (process.platform !== 'win32') { + fs.chmodSync(servicesConfigPath, 0o644); + } + this.logger.debug(`Using services config at: ${servicesConfigPath}`); const output = await this.exec([`--acquire-floating`], true); From 17ba53ad98bc1dd4f0f01cd6c56c82790293a720 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Thu, 27 Nov 2025 11:43:52 -0500 Subject: [PATCH 2/6] also directory --- src/license-client.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/license-client.ts b/src/license-client.ts index c3ee18e..dba35c5 100644 --- a/src/license-client.ts +++ b/src/license-client.ts @@ -111,6 +111,12 @@ export class LicensingClient { fs.mkdirSync(servicesConfigDirectory, { recursive: true }); } + if (process.platform !== 'win32') { + // Ensure the services directory has the correct permissions + fs.chmodSync(servicesConfigDirectory, 0o755); + } + + fs.accessSync(servicesConfigDirectory, fs.constants.R_OK | fs.constants.W_OK); return path.join(servicesConfigDirectory, 'services-config.json'); } From 1182dea8d4e9535e6b9e6503f802aeabc4bf2076 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Thu, 27 Nov 2025 11:44:34 -0500 Subject: [PATCH 3/6] npm i --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index b517890..03a1416 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@rage-against-the-pixel/unity-cli", - "version": "1.6.3", + "version": "1.6.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@rage-against-the-pixel/unity-cli", - "version": "1.6.3", + "version": "1.6.4", "license": "MIT", "dependencies": { "@electron/asar": "^4.0.1", From 99366da763e88cda7c36bed3d08287c261007406 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Thu, 27 Nov 2025 11:45:25 -0500 Subject: [PATCH 4/6] update permissions --- src/license-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/license-client.ts b/src/license-client.ts index dba35c5..271099f 100644 --- a/src/license-client.ts +++ b/src/license-client.ts @@ -425,7 +425,7 @@ export class LicensingClient { } if (process.platform !== 'win32') { - fs.chmodSync(servicesConfigPath, 0o644); + fs.chmodSync(servicesConfigPath, 0o755); } this.logger.debug(`Using services config at: ${servicesConfigPath}`); From e5ebffca062abb906d1177cfb4af0e95aa6cd526 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Thu, 27 Nov 2025 11:48:40 -0500 Subject: [PATCH 5/6] downgrade --- src/license-client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/license-client.ts b/src/license-client.ts index 271099f..8bc19e7 100644 --- a/src/license-client.ts +++ b/src/license-client.ts @@ -113,7 +113,7 @@ export class LicensingClient { if (process.platform !== 'win32') { // Ensure the services directory has the correct permissions - fs.chmodSync(servicesConfigDirectory, 0o755); + fs.chmodSync(servicesConfigDirectory, 0o644); } fs.accessSync(servicesConfigDirectory, fs.constants.R_OK | fs.constants.W_OK); @@ -425,7 +425,7 @@ export class LicensingClient { } if (process.platform !== 'win32') { - fs.chmodSync(servicesConfigPath, 0o755); + fs.chmodSync(servicesConfigPath, 0o644); } this.logger.debug(`Using services config at: ${servicesConfigPath}`); From b8ad6c283a5728a8ce6b4f3f0d65c265ea1dc4f0 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Thu, 27 Nov 2025 11:56:01 -0500 Subject: [PATCH 6/6] update permissions again --- src/license-client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/license-client.ts b/src/license-client.ts index 8bc19e7..d266d60 100644 --- a/src/license-client.ts +++ b/src/license-client.ts @@ -112,8 +112,7 @@ export class LicensingClient { } if (process.platform !== 'win32') { - // Ensure the services directory has the correct permissions - fs.chmodSync(servicesConfigDirectory, 0o644); + fs.chmodSync(servicesConfigDirectory, 0o755); } fs.accessSync(servicesConfigDirectory, fs.constants.R_OK | fs.constants.W_OK); @@ -428,6 +427,7 @@ export class LicensingClient { fs.chmodSync(servicesConfigPath, 0o644); } + fs.accessSync(servicesConfigPath, fs.constants.R_OK); this.logger.debug(`Using services config at: ${servicesConfigPath}`); const output = await this.exec([`--acquire-floating`], true);