[GH-ISSUE #181] profile configuration - path - special character #124

Closed
opened 2026-05-05 05:06:39 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @anarchic-system on GitHub (Dec 1, 2015).
Original GitHub issue: https://github.com/netblue30/firejail/issues/181

While one can use “special” characters in a directory or file name when using --whitelist or --blacklist[1] or the whitelist or blacklist options in a profile configuration file, I did not find how to use an exclamation mark[2] character in a directory name.

I added the following line in my iceweasel.profile
whitelist ~/!down
When running
firejail --debug iceweasel
I get
Error: "~/!down" is an invalid file name
I also tried escaping the ! character, quoting the path, quoting the whole line; does not work.

When trying on the command line with
firejail --debug "--whitelist=~/!down" iceweasel
I get
zsh: event not found: down
When trying on the command line with
firejail --debug "--whitelist=~/\!down" iceweasel
I get
Checking filename ~/!down Error: "~/!down" is an invalid filename

Using a space in the file name is working[3].
Using accents in the file name is working[4].

What am I missing?

[1]- man firejail is providing the sample firejail "--blacklist=/home/username/My Virtual Machines"
[2]- U+0021 EXCLAMATION MARK / '!'
[3]- Output of firejail --debug iceweasel: Removed whitelist path: whitelist ~/broap burp
[4]- Output of firejail --debug iceweasel: Removed whitelist path: whitelist ~/Ümlautißéèùça_marche

Originally created by @anarchic-system on GitHub (Dec 1, 2015). Original GitHub issue: https://github.com/netblue30/firejail/issues/181 While one can use “special” characters in a directory or file name when using `--whitelist` or `--blacklist`[1] or the _whitelist_ or _blacklist_ options in a profile configuration file, I did not find how to use an exclamation mark[2] character in a directory name. I added the following line in my _iceweasel.profile_ `whitelist ~/!down` When running `firejail --debug iceweasel` I get `Error: "~/!down" is an invalid file name` I also tried escaping the _!_ character, quoting the path, quoting the whole line; does not work. When trying on the command line with `firejail --debug "--whitelist=~/!down" iceweasel` I get `zsh: event not found: down` When trying on the command line with `firejail --debug "--whitelist=~/\!down" iceweasel` I get `Checking filename ~/!down Error: "~/!down" is an invalid filename` Using a space in the file name is working[3]. Using accents in the file name is working[4]. What am I missing? [1]- `man firejail` is providing the sample `firejail "--blacklist=/home/username/My Virtual Machines"` [2]- U+0021 EXCLAMATION MARK / '!' [3]- Output of `firejail --debug iceweasel`: `Removed whitelist path: whitelist ~/broap burp` [4]- Output of `firejail --debug iceweasel`: `Removed whitelist path: whitelist ~/Ümlautißéèùça_marche`
Author
Owner

@netblue30 commented on GitHub (Dec 3, 2015):

I'm trying to stay away from special chars in filenames. It is a SUID program, I have to protect it somehow.

<!-- gh-comment-id:161641715 --> @netblue30 commented on GitHub (Dec 3, 2015): I'm trying to stay away from special chars in filenames. It is a SUID program, I have to protect it somehow.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#124
No description provided.