mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4653] Allow specifying paths relative to XDG user dir variables (${DOWNLOADS}/something, ${PICTURES}/something...) #2739
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2739
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nativerv on GitHub (Oct 29, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4653
The problem
Currently, we can reference XDG user dirs by variables regardless of their actual name:
${DOWNLOADS},${DOCUMENTS},${PICTURES},${VIDEOS},${MUSIC}.Many programs use these directories only to create its own directory inside and use it for its purposes.
For example:
Telegram Desktop creates and defaults to
"Telegram Desktop"directory inside${DOWNLOADS}for its downloadsFlameshot defaults to
Screenshotsdirectory inside${PICTURES}to save its screenshotsIdeally the profiles must only
whitelistthese default directories to allow default behaviour and deny everything else.But the only way to allow these dirs and not depend on any hardcoded names is to
whitelist/noblacklistthe entire${DOWNLOADS}/${PICTURES}, as currently we get an error by trying to specify paths relative to XDG user dir variable:telegram-desktop.local:
The only way to go around that right now is to hardcode directory names relative to ${HOME} variable:
telegram-desktop.local:
/etc/firejail/keepassxc.profile:
Describe the solution you'd like
Allow specifying paths relative to XDG user dir variables as with
${HOME}variable:Additional context
Even if we consider XDG user dirs to be "public" for use by media programs by default, one can't even change that personally without hardcoding relative to
${HOME}. What if you renamed your XDG user dirs later, e.g.Downloads->downloads?@rusty-snake commented on GitHub (Oct 29, 2021):
Duplicate of #2359
@rusty-snake commented on GitHub (Oct 29, 2021):
Even more important IMHO, #4006 requires this.