Skip to content

Commit ea7690f

Browse files
CybotTMclaude
andcommitted
fix(composer): use chmod 755 instead of chmod +x for read permission
Fixes installation verification failure due to missing read permission. Problem: - sudo chmod +x sets permissions to rwx--x--x (owner: rwx, others: --x) - PHP cannot read the phar file without read permission - Results in "Could not open input file" error - Installation succeeds but verification fails Solution: - Changed chmod +x to chmod 755 - Sets permissions to rwxr-xr-x (owner: rwx, group: r-x, others: r-x) - PHP can now read and execute the phar file - Verification succeeds: "Composer version 2.8.12" ✓ Note: If you already have a broken installation at /usr/local/bin/composer, fix with: sudo chmod 755 /usr/local/bin/composer 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 080e296 commit ea7690f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/install_composer.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ echo "[composer] Installing to $INSTALL_DIR/composer..."
3838
if [ -w "$INSTALL_DIR" ]; then
3939
# User has write access
4040
cp "$TMP_FILE" "$INSTALL_DIR/composer"
41-
chmod +x "$INSTALL_DIR/composer"
41+
chmod 755 "$INSTALL_DIR/composer"
4242
elif command -v sudo >/dev/null 2>&1; then
4343
# Need sudo
4444
echo "[composer] Requires sudo to install to $INSTALL_DIR"
4545
sudo cp "$TMP_FILE" "$INSTALL_DIR/composer"
46-
sudo chmod +x "$INSTALL_DIR/composer"
46+
sudo chmod 755 "$INSTALL_DIR/composer"
4747
else
4848
echo "[composer] Error: Cannot write to $INSTALL_DIR and sudo not available" >&2
4949
echo "[composer] Try: COMPOSER_INSTALL_DIR=~/.local/bin $0" >&2

0 commit comments

Comments
 (0)