False PATH warning on Synology NAS due to symlinked home directory

Resolved 💬 2 comments Opened Feb 1, 2026 by kimseokho1226 Closed Mar 2, 2026

Description

claude --doctor shows a false warning about ~/.local/bin not being in PATH on Synology NAS, even though it is functionally present and Claude Code runs correctly.

Warning: Native installation exists but ~/.local/bin is not in your PATH
Fix: Run: echo 'export PATH="$HOME/.local/bin:$PATH"' >> your shell config file

This warning persists no matter how many times the PATH is configured correctly in shell config files.

Root Cause

Synology DSM uses symlinked home directories:

  • $HOME = /var/services/homes/username (symlink set by DSM)
  • Physical path = /volume1/homes/username (actual directory)

Both paths resolve to the same inode/directory.

Claude Code adds ~/.local/bin to PATH using the resolved physical path (/volume1/homes/...), but the diagnostic checks whether $HOME/.local/bin (/var/services/homes/...) exists in PATH via string comparison. Since the strings differ, the check fails — even though they point to the same directory.

Environment

  • Platform: Synology DSM 7.x (Linux 4.4.302+)
  • Claude Code: v2.1.29 (native installation)
  • Shell: /bin/bash

Evidence

$ printenv HOME
/var/services/homes/kimseokho

$ printenv PATH
/volume1/homes/kimseokho/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

$ readlink -f /var/services/homes/kimseokho
/volume1/homes/kimseokho

$ ls -la ~/.local/bin/claude
lrwxrwxrwx 1 kimseokho users 65 ... claude -> /var/services/homes/kimseokho/.local/share/claude/versions/2.1.29

The claude binary is found and works perfectly. Only the diagnostic string comparison fails.

Suggested Fix

When checking if ~/.local/bin is in PATH, resolve symlinks before comparing. For example:

// Instead of:
path.includes(`${HOME}/.local/bin`)

// Use something like:
const resolved = fs.realpathSync(`${HOME}/.local/bin`);
pathEntries.some(entry => {
  try { return fs.realpathSync(entry) === resolved; } 
  catch { return false; }
});

Or compare using fs.statSync() inode numbers for a more robust check.

Impact

  • Cosmetic only — no functional impact
  • Affects any system where the home directory involves symlinks (Synology NAS, some enterprise Linux setups, custom mount points)
  • Users cannot fix this through shell configuration since Claude Code itself sets the PATH entry with the physical path form

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗