Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#7213·firejail

firejail always creates an empty .zshrc

Author: OndrejMalekCreated Jul 24, 2026Updated Jul 24, 2026

Description

always empty .zshrc had to use --keep-shell-rc , .zshrc is symlink

Steps to Reproduce

# MY SHELL
noblacklist ${HOME}/.fzf.zsh
noblacklist ${HOME}/.homesick/repos/shell_public/home/.fzf.zsh
noblacklist ${HOME}/.oh-my-zsh
noblacklist ${HOME}/.homesick/repos/shell_public/home/.oh-my-zsh/
noblacklist ${HOME}/.zshenv
noblacklist ${HOME}/.zsh_history
noblacklist ${HOME}/.zsh_history_with_exits
noblacklist ${HOME}/.homesick/repos/shell_public/home/.zshrc
noblacklist ${HOME}/.zshrc
noblacklist ${HOME}/.zshrc.pre-oh-my-zsh
noblacklist ${HOME}/.homesick/repos/shell_public/home/.zshrc.pre-oh-my-zsh

whitelist-ro ${HOME}/.fzf.zsh
whitelist-ro ${HOME}/.homesick/repos/shell_public/home/.fzf.zsh
whitelist-ro ${HOME}/.oh-my-zsh
whitelist-ro ${HOME}/.homesick/repos/shell_public/home/.oh-my-zsh/
whitelist-ro ${HOME}/.zshenv
whitelist ${HOME}/.zsh_history
whitelist ${HOME}/.zsh_history.new
whitelist ${HOME}/.zsh_history_with_exits
whitelist-ro ${HOME}/.homesick/repos/shell_public/home/.zshrc
whitelist-ro ${HOME}/.zshrc
whitelist-ro ${HOME}/.zshrc.pre-oh-my-zsh
whitelist-ro ${HOME}/.homesick/repos/shell_public/home/.zshrc.pre-oh-my-zsh

noblacklist  ${HOME}/.bash_history
whitelist  ${HOME}/.bash_history

noblacklist ${HOME}/.bashrc
noblacklist ${HOME}/.bash_aliases
noblacklist ${HOME}/.profile
noblacklist ${HOME}/.bash_completion.d
whitelist-ro ${HOME}/.bashrc
whitelist-ro ${HOME}/.bash_aliases
whitelist-ro ${HOME}/.profile
whitelist-ro ${HOME}/.bash_completion.d

Its symlink

ls -la ~/.zshrc
lrwxrwxrwx 1 malekon malekon 54 Jul 24 11:50 /home/malekon/.zshrc -> /home/malekon/.homesick/repos/shell_public/home/.zshrc
  1. Run firejail --profile="myshell" ls -la ~/.zshrc

Expected behavior

none zero size .zshrc

Actual behavior

zero size .zshrc

Behavior without a profile

works .zshrc non zero size

Additional context

Any other detail that may help to understand/debug the problem

Environment

uname -srm Linux 6.18.38-1-longterm x86_64

firejail --version firejail version 0.9.80

Compile time support: - always force nonewprivs support is disabled - AppArmor support is disabled - AppImage support is enabled - chroot support is enabled - D-BUS proxy support is enabled - file transfer support is enabled - Landlock support is enabled - networking support is enabled - output logging is enabled - private-home support is enabled - private-lib support is disabled - sandbox check is enabled - SELinux support is enabled - user namespace support is enabled - X11 sandboxing support is enabled

OpenSuse Tumbleweed

Source: netblue30/firejail

View original on GitHubView discussion on GitHub