[PR #681] [MERGED] add --private-template=directory option #3714

Closed
opened 2026-05-05 10:06:34 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/681
Author: @nextime
Created: 8/4/2016
Status: Merged
Merged: 8/4/2016
Merged by: @netblue30

Base: masterHead: master


📝 Commits (5)

📊 Changes

7 files changed (+154 additions, -2 deletions)

View changed files

📝 src/firejail/firejail.h (+6 -1)
📝 src/firejail/fs_home.c (+95 -0)
📝 src/firejail/main.c (+24 -1)
📝 src/firejail/profile.c (+11 -0)
📝 src/firejail/sandbox.c (+3 -0)
📝 src/firejail/usage.c (+3 -0)
📝 src/man/firejail.txt (+12 -0)

📄 Description

--private mount a tmpfs over the user home, so, things like browser extensions and configurations are back to the defaults and you cannot pre-configure it easily.

--private=directory, on the other side, make the user home persistent.

--private-template=directory aim to /opt/firejail/templates/usernamebe an alternative, it act like --private mounting a tmpfs over the user home, and then it copy recursively all the files and dirs from a template directory to the created empty user home.

This way you can put, for example, a preconfigured .config/cromium directory let's says in /opt/firejail/templates/username, and then use
firejail --private-template=/opt/firejail/templates/username cromium

NOTE: as the copy from template is done after mounting the tmpfs to mask the user home, the template directory cannot be copied from inside the original user home.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/681 **Author:** [@nextime](https://github.com/nextime) **Created:** 8/4/2016 **Status:** ✅ Merged **Merged:** 8/4/2016 **Merged by:** [@netblue30](https://github.com/netblue30) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (5) - [`15b4792`](https://github.com/netblue30/firejail/commit/15b4792c7728a807b517b94d164b0a097d82b1d9) Add --private-template - [`bc8314c`](https://github.com/netblue30/firejail/commit/bc8314c8c6e8f8e757c8c5ddb49ec5e41368444f) Fix minor bugs - [`8f51240`](https://github.com/netblue30/firejail/commit/8f512407ddb2abc3e2b7ae71f848916e7e3fc64d) Make copydir work as expected - [`841c794`](https://github.com/netblue30/firejail/commit/841c794e12e694695cbf537d1b10f63a5c622556) Fix profile for --private-template - [`713807e`](https://github.com/netblue30/firejail/commit/713807e8f93e95763308bd1cc6aa5fd1b75ed13d) Fix dir creation owner ### 📊 Changes **7 files changed** (+154 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/firejail/firejail.h` (+6 -1) 📝 `src/firejail/fs_home.c` (+95 -0) 📝 `src/firejail/main.c` (+24 -1) 📝 `src/firejail/profile.c` (+11 -0) 📝 `src/firejail/sandbox.c` (+3 -0) 📝 `src/firejail/usage.c` (+3 -0) 📝 `src/man/firejail.txt` (+12 -0) </details> ### 📄 Description --private mount a tmpfs over the user home, so, things like browser extensions and configurations are back to the defaults and you cannot pre-configure it easily. --private=directory, on the other side, make the user home persistent. --private-template=directory aim to /opt/firejail/templates/usernamebe an alternative, it act like --private mounting a tmpfs over the user home, and then it copy recursively all the files and dirs from a template directory to the created empty user home. This way you can put, for example, a preconfigured .config/cromium directory let's says in /opt/firejail/templates/username, and then use `firejail --private-template=/opt/firejail/templates/username cromium` NOTE: as the copy from template is done after mounting the tmpfs to mask the user home, the template directory cannot be copied from inside the original user home. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:06:34 -06:00
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#3714
No description provided.