Skip to content

Doesn't work with multiple users. #136

Closed
@dpacmittal

Description

@dpacmittal

I've installed antigen for my root user. I copied the zshrc from root to my non-root user, and git cloned the antigen repo again for my non-root user. Now whenever I try to su to my non-root user, it gives me

fatal: could not create leading directories of '/root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git': Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/lib: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/lib: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/lib: Permission denied
fatal: could not create leading directories of '/root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git': Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/git: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/git: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/git: Permission denied
fatal: could not create leading directories of '/root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-completions.git': Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-completions.git/src: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-completions.git/src: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-completions.git/src: Permission denied
fatal: could not create leading directories of '/root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-syntax-highlighting.git': Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-syntax-highlighting.git/: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-syntax-highlighting.git/: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-syntax-highlighting.git/: Permission denied
fatal: could not create leading directories of '/root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-history-substring-search.git': Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-history-substring-search.git/: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-history-substring-search.git/: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-zsh-users-SLASH-zsh-history-substring-search.git/: Permission denied
fatal: could not create leading directories of '/root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git': Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/history: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/history: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/history: Permission denied
fatal: could not create leading directories of '/root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git': Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/vundle: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/vundle: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/vundle: Permission denied
fatal: could not create leading directories of '/root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git': Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/rsync: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/rsync: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/rsync: Permission denied
fatal: could not create leading directories of '/root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git': Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/tmux: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/tmux: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/tmux: Permission denied
fatal: could not create leading directories of '/root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git': Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/history-substring-search: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/history-substring-search: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/plugins/history-substring-search: Permission denied
fatal: could not create leading directories of '/root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git': Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/themes/dpoggi.zsh-theme: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/themes/dpoggi.zsh-theme: Permission denied
ls: cannot access /root/.antigen/repos/https-COLON--SLASH--SLASH-g.yxqyang.asia-SLASH-robbyrussell-SLASH-oh-my-zsh.git/themes/dpoggi.zsh-theme: Permission denied

This is caused because the variable $ADOTDIR is '/root/.antigen' for both the root user and the non-root user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions