Skip to content

Commit d3e971e

Browse files
authored
fix: bug (#5305)
1 parent f65ddcf commit d3e971e

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Diff for: extensions/ide/vscode/devbox/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
1010

1111
- Adjust `Remote-SSH` to install by code.
1212

13+
### Fixed
14+
15+
- Fix Windows file authority issue caused by `Everyone` group.
16+
1317
## [1.2.1] - 2024-12-4
1418

1519
### Fixed

Diff for: extensions/ide/vscode/devbox/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "devbox-aio",
33
"displayName": "%displayName%",
44
"description": "%description%",
5-
"version": "1.3.2024120601",
5+
"version": "1.3.2024122401",
66
"keywords": [
77
"devbox",
88
"remote development",

Diff for: extensions/ide/vscode/devbox/src/utils/file.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export const ensureFileAccessPermission = async (path: string) => {
1313
if (!username) {
1414
throw new Error('can not get username')
1515
}
16-
// await execa('icacls', [path, '/inheritance:r'])
1716
// await execa('icacls', [path, '/grant:r', `${username}:F`])
18-
// await execa('icacls', [path, '/remove:g', 'everyone'])
17+
await execa('icacls', [path, '/inheritance:d'])
18+
await execa('icacls', [path, '/remove:g', 'everyone'])
1919
} catch (error) {
2020
Logger.error(`Failed to set file access permission: ${error}`)
2121
}
@@ -40,7 +40,7 @@ export function ensureFileExists(filePath: string, parentDir: string) {
4040
recursive: true,
4141
})
4242
fs.writeFileSync(filePath, '', 'utf8')
43-
// .ssh/config authority
44-
ensureFileAccessPermission(filePath)
4543
}
44+
// .ssh/config authority
45+
ensureFileAccessPermission(filePath)
4646
}

0 commit comments

Comments
 (0)