Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: some users everyone authority bug #5305

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions extensions/ide/vscode/devbox/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how

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

### Fixed

- Fix Windows file authority issue caused by `Everyone` group.

## [1.2.1] - 2024-12-4

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion extensions/ide/vscode/devbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "devbox-aio",
"displayName": "%displayName%",
"description": "%description%",
"version": "1.3.2024120601",
"version": "1.3.2024122401",
"keywords": [
"devbox",
"remote development",
Expand Down
8 changes: 4 additions & 4 deletions extensions/ide/vscode/devbox/src/utils/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export const ensureFileAccessPermission = async (path: string) => {
if (!username) {
throw new Error('can not get username')
}
// await execa('icacls', [path, '/inheritance:r'])
// await execa('icacls', [path, '/grant:r', `${username}:F`])
// await execa('icacls', [path, '/remove:g', 'everyone'])
await execa('icacls', [path, '/inheritance:d'])
await execa('icacls', [path, '/remove:g', 'everyone'])
} catch (error) {
Logger.error(`Failed to set file access permission: ${error}`)
}
Expand All @@ -40,7 +40,7 @@ export function ensureFileExists(filePath: string, parentDir: string) {
recursive: true,
})
fs.writeFileSync(filePath, '', 'utf8')
// .ssh/config authority
ensureFileAccessPermission(filePath)
}
// .ssh/config authority
ensureFileAccessPermission(filePath)
}
Loading