[GH-ISSUE #461] more on writable-etc/writable-var #328

Closed
opened 2026-05-05 05:36:41 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @netblue30 on GitHub (Apr 20, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/461

Form @nick75e here: 0b5429c995

Is it possible to make writable-etc and writable-var behave like this:
writable-etc: make /etc writeable
writable-var: make /var writeable
AND
writable-etc foo,bar/, : make /etc/foo and /etc/bar/ writeable but keep /etc read-only
writable-var foo,bar/, : make /var/foo and /var/bar/ writeable but keep /var read-only
It'd be also great to have them available in profile files.

Thanks.

Originally created by @netblue30 on GitHub (Apr 20, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/461 Form @nick75e here: https://github.com/netblue30/firejail/commit/0b5429c995966fa0e3c36737a16a9ac20bf2513d Is it possible to make writable-etc and writable-var behave like this: writable-etc: make /etc writeable writable-var: make /var writeable AND writable-etc foo,bar/, : make /etc/foo and /etc/bar/ writeable but keep /etc read-only writable-var foo,bar/, : make /var/foo and /var/bar/ writeable but keep /var read-only It'd be also great to have them available in profile files. Thanks.
gitea-mirror 2026-05-05 05:36:41 -06:00
Author
Owner

@netblue30 commented on GitHub (Apr 20, 2016):

Added writable-etc and writable-var support for profile files, more to come...

<!-- gh-comment-id:212419369 --> @netblue30 commented on GitHub (Apr 20, 2016): Added writable-etc and writable-var support for profile files, more to come...
Author
Owner

@netblue30 commented on GitHub (Apr 21, 2016):

I've implemented a new command, --read-write:

       --read-write=dirname_or_filename
              By  default,  the  sandbox  mounts system directories read-only.
              These directories are  /etc,  /var,  /usr,  /bin,  /sbin,  /lib,
              /lib32, /libx32 and /lib64.  Use this option to mount read-write
              files or directories inside the system directories.

              This option is available only to root user.  It  has  no  effect
              when --chroot or --overlay are also set. In these cases the sys‐
              tem directories are mounted read-write.

Use it to define read-write the directories you need, for example:

$ firejail --read-write=/var/opt --read-write=/var/mail
<!-- gh-comment-id:213061865 --> @netblue30 commented on GitHub (Apr 21, 2016): I've implemented a new command, --read-write: ``` --read-write=dirname_or_filename By default, the sandbox mounts system directories read-only. These directories are /etc, /var, /usr, /bin, /sbin, /lib, /lib32, /libx32 and /lib64. Use this option to mount read-write files or directories inside the system directories. This option is available only to root user. It has no effect when --chroot or --overlay are also set. In these cases the sys‐ tem directories are mounted read-write. ``` Use it to define read-write the directories you need, for example: ``` $ firejail --read-write=/var/opt --read-write=/var/mail ```
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#328
No description provided.