Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using --private=homedir and --private-cache, doesn't do --private-cache #2968

Closed
jonleivent opened this issue Sep 17, 2019 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@jonleivent
Copy link

In firejail version 0.9.61 on Debian 10.

The combination of using --private=somedir with --private-cache doesn't work: the --private-cache setting doesn't prevent somedir/.cache from being used.

Tested using:
firejail --private=somedir --private-cache firefox

I haven't checked previous versions of firejail. My use case is that I'm placing somedir in a small encrypted volume (possibly on a usb stick): so somedir/.cache is superfluous, uses up precious space in the encrypted volume, and slows things down as it encrypts/decrypts.

@jonleivent
Copy link
Author

More on this: the failure of --private-cache to take hold only happens when there was initially no .cache folder present in somedir. If I create an empty somedir/.cache, then --private=somedir --private-cache work together properly. OK - I will keep an empty .cache around in each such somedir. But, should firejail print out an error if there is no .cache directory in home when --private-cache is used? If not, this is perhaps a security issue, allowing info to escape the firejail into .cache when that was supposed to be prevented by --private-cache?

@rusty-snake
Copy link
Collaborator

Fix: '--mkdir=${HOME}/.cache' #903

@jonleivent
Copy link
Author

Unfortunately @rusty-snake, using mkdir in a profile only works in ~ or in /tmp. The somedir I'm using in --private=somedir is on a separate volume entirely (and even after "private somedir" appears in the profile, somedir isn't considered by mkdir to be adequate). I will just have to ensure somedir has a .cache in it via a script check outside of the firejail profile.

@smitsohu
Copy link
Collaborator

But, should firejail print out an error if there is no .cache directory in home when --private-cache is used?

You should see a warning, and if there is none that's a bug I would say.

@rusty-snake rusty-snake added the bug Something isn't working label Nov 10, 2019
smitsohu added a commit that referenced this issue Nov 12, 2019
@smitsohu
Copy link
Collaborator

Making the warning an error is a bit problematic, iirc some people are putting this in their /etc/firejail/globals.local, and it would break their setup.

But I've updated the warning message, I think it is more clear now there is something going wrong with the private-cache. Thanks for the report.

Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants