Skip to content

fix: Write project settings.json with owner-only permissions - #826

Merged
andypalmi merged 1 commit into
mainfrom
settings-file-owner-only
Nov 16, 2026
Merged

andypalmi merged 1 commit into
mainfrom
settings-file-owner-only

Conversation

@andypalmi

Copy link
Copy Markdown
Contributor

Description

Follow-up to #825. The launcher writes project/settings.json with mode 0600, the same as device.yml.

  1. A new file is opened with mode 0600.
  2. The file is rewritten on every start, so an existing file also gets chmod 0600. If that fails, for example with EPERM on a file owned by another user, the error is logged and the write goes ahead.

A test covers both the new file and the rewrite. It is skipped on Windows.

The launcher now creates settings.json with mode 0600 and sets that mode when an existing file is rewritten. Failing to change the mode of a file owned by another user is logged and ignored.
@andypalmi andypalmi self-assigned this Nov 16, 2026
@andypalmi
andypalmi requested a review from hardillb November 16, 2026 11:01
@andypalmi andypalmi changed the title Write project settings.json with owner-only permissions fix: Write project settings.json with owner-only permissions Nov 16, 2026
@andypalmi
andypalmi requested a review from Steve-Mcl November 16, 2026 11:04
@andypalmi
andypalmi merged commit 949fee5 into main Nov 16, 2026
7 of 8 checks passed
@andypalmi
andypalmi deleted the settings-file-owner-only branch November 16, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants