You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running zinit as root (e.g., in a container) and installing a completion from gh-r, I encountered a complaint from compinit saying: 'zsh compinit: insecure files, run compaudit for list.' This warning appears because the owner of the completion file is different from the current user (root). The root cause of this issue is the behavior of the tar command used to extract the archive from gh-r.
--no-same-owner
Extract files as yourself (default for ordinary users).
--same-owner
Try extracting files with the same ownership as exists in the archive (default for superuser).
To fix this, we can pass the --no-same-owner option explicitly to the tar command when extracting the archive.
Steps to reproduce
Here is an example taken from the wiki.
As root, install ripgrep as follows:
zi for \
from'gh-r' \
sbin'**/rg -> rg' \
BurntSushi/ripgrep
Relevant output
After running the above installation, the compinit command shows the following message:
zsh compinit: insecure files, run compaudit for list.
Ignore insecure files and continue [y] or abort compinit [n]?
Here's the output of compaudit:
There are insecure files:
/root/.local/share/zinit/completions/_rg
Here we can observe that the owner/group of the file is different from the current user (root):
> ls -l /root/.local/share/zinit/completions/_rg
lrwxrwxrwx 1 root root 107 Aug 5 13:54 /root/.local/share/zinit/completions/_rg -> /root/.local/share/zinit/plugins/BurntSushi---ripgrep/ripgrep-13.0.0-x86_64-unknown-linux-musl/complete/_rg
> ls -l /root/.local/share/zinit/plugins/BurntSushi---ripgrep/ripgrep-13.0.0-x86_64-unknown-linux-musl/complete/_rg
-rw-r--r-- 1 1001 116 29096 Jun 12 2021 /root/.local/share/zinit/plugins/BurntSushi---ripgrep/ripgrep-13.0.0-x86_64-unknown-linux-musl/complete/_rg
### Screenshots and recordings
_No response_
### Operating System & Version
OS: linux-gnu | Vendor: pc | Machine: x86_64 | CPU: x86_64 | Processor: unknown | Hardware: x86_64
### Zsh version
zsh 5.9 (x86_64-pc-linux-gnu)
### Terminal emulator
xterm
### If using WSL on Windows, which version of WSL
None
### Additional context
I encountered the issue when running on container.
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
What happened?
When running zinit as root (e.g., in a container) and installing a completion from gh-r, I encountered a complaint from compinit saying: 'zsh compinit: insecure files, run compaudit for list.' This warning appears because the owner of the completion file is different from the current user (root). The root cause of this issue is the behavior of the tar command used to extract the archive from gh-r.
To fix this, we can pass the --no-same-owner option explicitly to the tar command when extracting the archive.
Steps to reproduce
Here is an example taken from the wiki.
As root, install
ripgrep
as follows:Relevant output
Here's the output of
compaudit
:Here we can observe that the owner/group of the file is different from the current user (root):
The text was updated successfully, but these errors were encountered: