[GH-ISSUE #64] --private-home fails on paths with special characters #35

Closed
opened 2026-05-05 04:49:29 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @pigmonkey on GitHub (Sep 16, 2015).
Original GitHub issue: https://github.com/netblue30/firejail/issues/64

Attempting to use --private-home on a directory with white space fails, even with the white space escaped.

$ firejail --private-home=/home/pigmonkey/test\ dir/
Warning: default profile disabled by --private-home option
Parent pid 20112, child pid 20113
cp: cannot stat ‘/home/pigmonkey/test’: No such file or directory
cp: cannot stat ‘dir/’: No such file or directory
Error system cp -a --parents:duplicate(378): No such file or directory
Child process initialized
...

Trying it with quotes:

$ firejail --private-home="/home/pigmonkey/test\ dir/"
Error: file /home/pigmonkey/test\ dir/ not found.

Same thing for other special characters, like parenthesis:

$ touch ~/tmp/File\(1\).txt
$ firejail --private-home=/home/pigmonkey/tmp/File\(1\).txt
Originally created by @pigmonkey on GitHub (Sep 16, 2015). Original GitHub issue: https://github.com/netblue30/firejail/issues/64 Attempting to use `--private-home` on a directory with white space fails, even with the white space escaped. ``` $ firejail --private-home=/home/pigmonkey/test\ dir/ Warning: default profile disabled by --private-home option Parent pid 20112, child pid 20113 cp: cannot stat ‘/home/pigmonkey/test’: No such file or directory cp: cannot stat ‘dir/’: No such file or directory Error system cp -a --parents:duplicate(378): No such file or directory Child process initialized ... ``` Trying it with quotes: ``` $ firejail --private-home="/home/pigmonkey/test\ dir/" Error: file /home/pigmonkey/test\ dir/ not found. ``` Same thing for other special characters, like parenthesis: ``` $ touch ~/tmp/File\(1\).txt $ firejail --private-home=/home/pigmonkey/tmp/File\(1\).txt ```
gitea-mirror 2026-05-05 04:49:29 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@netblue30 commented on GitHub (Sep 16, 2015):

I put a fix in, thank you for the bug! This should work now:

$ firejail --private-home=/home/pigmonkey/test\ dir/
$ firejail --private-home=/home/pigmonkey/tmp/File\(1\).txt
<!-- gh-comment-id:140909358 --> @netblue30 commented on GitHub (Sep 16, 2015): I put a fix in, thank you for the bug! This should work now: ``` $ firejail --private-home=/home/pigmonkey/test\ dir/ $ firejail --private-home=/home/pigmonkey/tmp/File\(1\).txt ```
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#35
No description provided.