clawhub install always fails with "mkdir '/home/moltbotuser'" after user rename (EACCES permission denied) #31

Closed
opened 2026-02-15 17:15:13 -05:00 by yindo · 0 comments
Owner

Originally created by @JamesTsetsekas on GitHub (Jan 31, 2026).

Bug Description

The clawhub install <slug> command fails with:

Error: EACCES: permission denied, mkdir '/home/moltbotuser'

This happens every time, even after full user rename, fresh user creation, restoring only clawd/ and .openclaw/ from backup, and completely purging clawhub (uninstall, rm node_modules/bin/config/cache, npm cache clean --force, reinstall --force).

clawhub search works fine (e.g. returns radarr v1.0.1), but install always tries to mkdir in the old deleted home path /home/moltbotuser.

Environment

  • OS: Ubuntu 22.04.5 LTS (GNU/Linux 6.8.0-1041-oracle aarch64)
  • Architecture: aarch64 (Oracle Cloud ARM instance)
  • Node.js: [paste node -v output here]
  • npm: [paste npm -v output here]
  • clawhub version: 0.4.0 (from clawhub --cli-version)
  • npm global prefix: ~/.npm-global (user-owned)
  • PATH includes ~/.npm-global/bin

Steps to Reproduce

  1. npm install -g clawhub@latest --force
  2. clawhub search plex → works
  3. clawhub install plex → fails with mkdir '/home/moltbotuser'

Same after full cleanup/reinstall.

Additional Debugging Done

  • No string "moltbotuser" in ~/.npm-global/lib/node_modules/clawhub* (grep -r)
  • No ~/.config/clawdhub/config.json exists (cat fails)
  • No ~/.clawhub directory
  • Setting CLAWDHUB_DIR=~/test-skills had no effect — still tries old path
  • Symlink hack (sudo ln -s /home/openclaw /home/moltbotuser) changed error to:
    Error: EACCES: permission denied, mkdir '/home/moltbotuser/clawd'
    
    → clawhub is specifically trying to use /home/moltbotuser/clawd as workspace/default dir (which already exists after restore, hence EACCES)

Expected Behavior

clawhub install should create directories in current $HOME (/home/openclaw/...), not in a long-deleted old home path.

Actual Behavior

It attempts mkdir('/home/moltbotuser/clawd') → EACCES because that path resolves to an existing directory after symlink.

Workaround

Manual install works fine:

mkdir -p ~/clawd/skills/<slug>
cd ~/clawd/skills/<slug>
curl -o SKILL.md https://raw.githubusercontent.com/openclaw/skills/main/skills/<path-to-skill>/SKILL.md
openclaw gateway restart

Suggestion

Ensure all path resolutions use os.homedir() or process.env.HOME at runtime. Avoid caching absolute paths across installs/renames.

Thanks for the great tool — clawhub search is useful, but install is blocked by this rename bug.

Originally created by @JamesTsetsekas on GitHub (Jan 31, 2026). ### Bug Description The `clawhub install <slug>` command fails with: ``` Error: EACCES: permission denied, mkdir '/home/moltbotuser' ``` This happens **every time**, even after full user rename, fresh user creation, restoring only clawd/ and .openclaw/ from backup, and completely purging clawhub (uninstall, rm node_modules/bin/config/cache, npm cache clean --force, reinstall --force). `clawhub search` works fine (e.g. returns `radarr v1.0.1`), but install always tries to mkdir in the old deleted home path `/home/moltbotuser`. ### Environment - OS: Ubuntu 22.04.5 LTS (GNU/Linux 6.8.0-1041-oracle aarch64) - Architecture: aarch64 (Oracle Cloud ARM instance) - Node.js: [paste node -v output here] - npm: [paste npm -v output here] - clawhub version: 0.4.0 (from `clawhub --cli-version`) - npm global prefix: `~/.npm-global` (user-owned) - PATH includes `~/.npm-global/bin` ### Steps to Reproduce 1. `npm install -g clawhub@latest --force` 2. `clawhub search plex` → works 3. `clawhub install plex` → fails with `mkdir '/home/moltbotuser'` Same after full cleanup/reinstall. ### Additional Debugging Done - No string "moltbotuser" in `~/.npm-global/lib/node_modules/clawhub*` (grep -r) - No `~/.config/clawdhub/config.json` exists (cat fails) - No `~/.clawhub` directory - Setting `CLAWDHUB_DIR=~/test-skills` had no effect — still tries old path - Symlink hack (`sudo ln -s /home/openclaw /home/moltbotuser`) changed error to: ``` Error: EACCES: permission denied, mkdir '/home/moltbotuser/clawd' ``` → clawhub is specifically trying to use `/home/moltbotuser/clawd` as workspace/default dir (which already exists after restore, hence EACCES) ### Expected Behavior `clawhub install` should create directories in current $HOME (`/home/openclaw/...`), not in a long-deleted old home path. ### Actual Behavior It attempts mkdir('/home/moltbotuser/clawd') → EACCES because that path resolves to an existing directory after symlink. ### Workaround Manual install works fine: ```bash mkdir -p ~/clawd/skills/<slug> cd ~/clawd/skills/<slug> curl -o SKILL.md https://raw.githubusercontent.com/openclaw/skills/main/skills/<path-to-skill>/SKILL.md openclaw gateway restart ``` ### Suggestion Ensure all path resolutions use `os.homedir()` or `process.env.HOME` at runtime. Avoid caching absolute paths across installs/renames. Thanks for the great tool — clawhub search is useful, but install is blocked by this rename bug.
yindo closed this issue 2026-02-15 17:15:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/clawhub#31