antigen icon indicating copy to clipboard operation
antigen copied to clipboard

Antigen tries to install plugins to root when logged in to root first

Open lrustand opened this issue 5 years ago • 1 comments

Description

When I log in to the root user (with zsh and antigen) and then su to my user antigen tries to install all my plugins to /root. If I su to my user from bash or log in to that user directly it correctly finds my .antigen folder and all the installed plugins.

Steps to reproduce

Minimal steps to reproduce this behavior. Example:

1 - Log in as root (with zsh shell and antigen loaded)
2 - Su to a different user which also uses zsh and antigen
3 - Antigen tries to install the user's plugins to /root

Expected behavior:

- Everything works correctly

Software version

  • Antigen v1.3.3
  • zsh 5.7.1 (x86_64-pc-linux-gnu)
  • Linux i7 5.3.5-arch1-1-ARCH #1 SMP PREEMPT Mon Oct 7 19:03:08 UTC 2019 x86_64 GNU/Linux

More information

[19:15, 14/10/19]
root@i7 [/] -> su lars
mkdir: cannot create directory ‘/root’: Permission denied
mkdir: cannot create directory ‘/root’: Permission denied
Installing robbyrussell/oh-my-zsh... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing robbyrussell/oh-my-zsh... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing robbyrussell/oh-my-zsh... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing robbyrussell/oh-my-zsh... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing robbyrussell/oh-my-zsh... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing zsh-users/zsh-syntax-highlighting... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing knu/zsh-manydots-magic... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing supercrabtree/k... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing zsh-users/zsh-autosuggestions... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
-zcache-generate-cache:45: permission denied: /root/.antigen/.cache/.zcache-payload
-zcache-generate-cache:46: permission denied: /root/.antigen/.cache/.zcache-bundles
zcache-load-cache:source:1: permission denied: /root/.antigen/.cache/.zcache-payload
zsh: command not found: shrink_path

lrustand avatar Oct 14 '19 17:10 lrustand

Please, update antigen to latest version and see if this issue still occurs.

Could not reproduce this (running v2.2.2)

sparcbr avatar Nov 13 '19 23:11 sparcbr