fix: Use proper file permissions in INSTALL.ts for Linux/WSL #571
+14
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
chmod -R 755(makes ALL files executable) with granular Linux permissions750(rwxr-x---), files:640(rw-r-----), scripts:750(rwxr-x---)find -exec ... +instead of\;for better performanceProblem
fixPermissions()in INSTALL.ts runschmod -R 755on the entire~/.claudedirectory, making every file executable — including JSON configs, markdown files, and YAML. On Linux/WSL, only directories and scripts should have the execute bit. This is both a security issue (unnecessary execute permissions) and breaks expectations for standard Linux file permissions.The function also runs
chmod -R 755three times (steps 1, 3, and the script step), which is redundant.Fix
Replace the three-step chmod/chown/chmod approach with:
chown -R— set ownership firstfind -type d -exec chmod 750— directories onlyfind -type f -exec chmod 640— regular files (no execute)find -type f -name "*.ts|*.sh|*.py" -exec chmod 750— scripts onlyTest plan
.tsand.shfiles have execute permission (750).json,.md,.yamlfiles do NOT have execute permission (640)Fixes #484
🤖 Generated with Claude Code