aboutsummaryrefslogtreecommitdiffstats
path: root/src/man/firejail-profile.5.in
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-07-12 01:55:07 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-07-13 11:43:53 -0300
commit76bd5ad0f8347bc111c30f67b2eb151c2e5870ed (patch)
tree3fd235c83d6ce45451abc80dca27420203d3aad6 /src/man/firejail-profile.5.in
parentbuild: restore seccomp filter targets (diff)
downloadfirejail-76bd5ad0f8347bc111c30f67b2eb151c2e5870ed.tar.gz
firejail-76bd5ad0f8347bc111c30f67b2eb151c2e5870ed.tar.zst
firejail-76bd5ad0f8347bc111c30f67b2eb151c2e5870ed.zip
build: simplify code related to man pages
Simplify the main targets and use wildcards instead of repeating the filenames manually. Also, restore the `man` target and building only when `HAVE_MAN` is enabled. Note: Make automatically removes intermediate files (.1 and .5), so in general only the .gz files have to be cleaned. Commands used to rename the man pages: cd src/man git mv firecfg.txt firecfg.1.in git mv firejail-login.txt firejail-login.5.in git mv firejail-profile.txt firejail-profile.5.in git mv firejail-users.txt firejail-users.5.in git mv firejail.txt firejail.1.in git mv firemon.txt firemon.1.in git mv jailcheck.txt jailcheck.1.in This is kind of a follow-up to commit 9e206b7f2 ("rework src/man Makefile", 2023-07-07).
Diffstat (limited to 'src/man/firejail-profile.5.in')
-rw-r--r--src/man/firejail-profile.5.in1052
1 files changed, 1052 insertions, 0 deletions
diff --git a/src/man/firejail-profile.5.in b/src/man/firejail-profile.5.in
new file mode 100644
index 000000000..fa294d888
--- /dev/null
+++ b/src/man/firejail-profile.5.in
@@ -0,0 +1,1052 @@
1.TH FIREJAIL-PROFILE 5 "MONTH YEAR" "VERSION" "firejail profiles man page"
2.SH NAME
3profile \- Security profile file syntax, and information about building new application profiles.
4
5.SH SYNOPSIS
6
7Using a specific profile:
8.PP
9.RS
10.TP
11\fBfirejail \-\-profile=filename.profile
12.br
13
14.br
15Example:
16.br
17$ firejail --appimage --profile=/etc/firejail/kdenlive.profile kdenlive.appimage
18.br
19
20.br
21.TP
22\fBfirejail \-\-profile=profile_name
23.br
24
25.br
26Example:
27.br
28$ firejail --appimage --profile=kdenlive kdenlive.appimage
29.br
30
31.br
32.RE
33.PP
34
35
36
37Building a profile manually:
38.PP
39.RS
40Start with the template in /usr/share/doc/firejail/profile.template and modify it in a text editor.
41To integrate the program in your desktop environment copy the profile file in ~/.config/firejail
42directory and run "sudo firecfg".
43.RE
44.PP
45
46Aliases and redirections:
47.PP
48.RS
49In some cases the same profile can be used for several applications.
50One such example is LibreOffice.
51Build a regular profile for the main application, and for the rest use
52/usr/share/doc/firejail/redirect_alias-profile.template.
53.RE
54.PP
55
56Running the profile builder:
57.PP
58.RS
59.TP
60\fBfirejail \-\-build=appname.profile appname
61.br
62
63.br
64Example:
65.br
66$ firejail --build=blobby.profile blobby
67.br
68
69.br
70Run the program in "firejail \-\-build" and try to exercise as many program features as possible.
71The profile is extracted and saved in the current directory. Open it in a text editor and add or remove
72sandboxing options as necessary. Test again after modifying the profile. To integrate the program
73in your desktop environment copy the profile file in ~/.config/firejail directory and run "sudo firecfg".
74.RE
75.PP
76
77.SH DESCRIPTION
78Several command line options can be passed to the program using
79profile files. Firejail chooses the profile file as follows:
80
81\fB1.\fR If a profile file is provided by the user with \-\-profile option, the profile file is loaded. If a profile name is given, it is searched for first in the ~/.config/firejail directory and if not found then in /etc/firejail directory. Profile names do not include the .profile suffix.
82Example:
83.PP
84.RS
85$ firejail --profile=/home/netblue/icecat.profile icecat
86.br
87Reading profile /home/netblue/icecat.profile
88.br
89[...]
90.RE
91
92.PP
93.RS
94$ firejail --profile=icecat icecat-wrapper.sh
95.br
96Reading profile /etc/firejail/icecat.profile
97.br
98[...]
99.RE
100
101\fB2.\fR If a profile file with the same name as the application is present in ~/.config/firejail directory or
102in /etc/firejail, the profile is loaded. ~/.config/firejail takes precedence over /etc/firejail. Example:
103.PP
104.RS
105$ firejail icecat
106.br
107Command name #icecat#
108.br
109Found icecat profile in /home/netblue/.config/firejail directory
110.br
111Reading profile /home/netblue/.config/firejail/icecat.profile
112.br
113[...]
114.RE
115
116\fB3.\fR Use a default.profile file if the sandbox
117is started by a regular user, or a server.profile file if the sandbox
118is started by root. Firejail looks for these files in ~/.config/firejail directory, followed by /etc/firejail directory.
119To disable default profile loading, use --noprofile command option. Example:
120.PP
121.RS
122$ firejail
123.br
124Reading profile /etc/firejail/default.profile
125.br
126Parent pid 8553, child pid 8554
127.br
128Child process initialized
129.br
130[...]
131.br
132
133.br
134$ firejail \-\-noprofile
135.br
136Parent pid 8553, child pid 8554
137.br
138Child process initialized
139.br
140[...]
141.RE
142
143.SH Templates
144In /usr/share/doc/firejail there are two templates to write new profiles.
145.RS
146profile.template - for regular profiles
147.br
148redirect_alias-profile.template - for aliasing/redirecting profiles
149.RE
150
151
152.SH Scripting
153Scripting commands:
154
155.TP
156\fBFile and directory names
157File and directory names containing spaces are supported. The space character ' ' should not be escaped.
158
159Example: "blacklist ~/My Virtual Machines"
160
161.TP
162\fB# this is a comment
163Example:
164
165# disable networking
166.br
167net none # this command creates an empty network namespace
168
169.TP
170\fB?CONDITIONAL: profile line
171Conditionally add profile line.
172
173Example: "?HAS_APPIMAGE: whitelist ${HOME}/special/appimage/dir"
174
175This example will load the whitelist profile line only if the \-\-appimage option has been specified on the command line.
176
177Currently the only conditionals supported this way are HAS_APPIMAGE, HAS_NET, HAS_NODBUS, HAS_NOSOUND, HAS_PRIVATE and HAS_X11. The conditionals ALLOW_TRAY, BROWSER_DISABLE_U2F and BROWSER_ALLOW_DRM
178can be enabled or disabled globally in Firejail's configuration file.
179
180The profile line may be any profile line that you would normally use in a profile \fBexcept\fR for "quiet" and "include" lines.
181
182Note: When using one or more conditionals and \fB--profile\fR, it is
183recommended that the relevant option(s) (such as \fB--appimage\fR) be specified
184before \fB--profile\fR, so that their respective conditional(s) (such as
185\fB?HAS_APPIMAGE\fR) inside of the profile evaluate to true.
186
187.TP
188\fBinclude other.profile
189Include other.profile file.
190
191Example: "include /etc/firejail/disable-common.inc"
192
193The file name can be prefixed with a macro such as ${HOME} or ${CFG}.
194${HOME} is expanded as user home directory, and ${CFG} is expanded as
195Firejail system configuration directory - in most cases /etc/firejail or
196/usr/local/etc/firejail.
197
198Example: "include ${HOME}/myprofiles/profile1" will load "~/myprofiles/profile1" file.
199
200Example: "include ${CFG}/firefox.profile" will load "/etc/firejail/firefox.profile" file.
201
202The file name may also be just the name without the leading directory components. In this case, first the user config directory (${HOME}/.config/firejail) is searched for the file name and if not found then the system configuration directory is search for the file name. Note: Unlike the \-\-profile option which takes a profile name without the '.profile' suffix, include must be given the full file name.
203
204Example: "include firefox.profile" will load "${HOME}/.config/firejail/firefox.profile" file and if it does not exist "${CFG}/firefox.profile" will be loaded.
205
206System configuration files in ${CFG} are overwritten during software installation.
207Persistent configuration at system level is handled in ".local" files. For every
208profile file in ${CFG} directory, the user can create a corresponding .local file
209storing modifications to the persistent configuration. Persistent .local files
210are included at the start of regular profile files.
211
212.TP
213\fBnoblacklist file_name
214If the file name matches file_name, the file will not be blacklisted in any blacklist commands that follow.
215
216Example: "noblacklist ${HOME}/.mozilla"
217
218.TP
219\fBnowhitelist file_name
220If the file name matches file_name, the file will not be whitelisted in any whitelist commands that follow.
221
222Example: "nowhitelist ~/.config"
223
224.TP
225\fBignore
226Ignore command.
227
228Example: "ignore seccomp"
229#ifdef HAVE_NETWORK
230.br
231Example: "ignore net eth0"
232#endif
233.TP
234\fBquiet
235Disable Firejail's output. This should be the first uncommented command in the profile file.
236
237Example: "quiet"
238
239.SH Filesystem
240These profile entries define a chroot filesystem built on top of the existing
241host filesystem. Each line describes a file/directory that is inaccessible
242(\fBblacklist\fR), a read-only file or directory (\fBread-only\fR),
243a tmpfs mounted on top of an existing directory (\fBtmpfs\fR),
244or mount-bind a directory or file on top of another directory or file (\fBbind\fR).
245Use \fBprivate\fR to set private mode. File globbing is supported, and PATH and
246HOME directories are searched, see the \fBfirejail\f(1) \fBFILE GLOBBING\fR section
247for more details.
248Examples:
249.TP
250\fBblacklist file_or_directory
251Blacklist directory or file. Examples:
252.br
253
254.br
255blacklist /usr/bin
256.br
257blacklist /usr/bin/gcc*
258.br
259blacklist ${PATH}/ifconfig
260.br
261blacklist ${HOME}/.ssh
262
263.TP
264\fBblacklist-nolog file_or_directory
265When --tracelog flag is set, blacklisting generates syslog messages if the sandbox tries to access the file or directory.
266blacklist-nolog command disables syslog messages for this particular file or directory. Examples:
267.br
268
269.br
270blacklist-nolog /usr/bin
271.br
272blacklist-nolog /usr/bin/gcc*
273
274.TP
275\fBbind directory1,directory2
276Mount-bind directory1 on top of directory2. This option is only available when running as root.
277.TP
278\fBbind file1,file2
279Mount-bind file1 on top of file2. This option is only available when running as root.
280.TP
281\fBdisable-mnt
282Disable /mnt, /media, /run/mount and /run/media access.
283.TP
284\fBkeep-config-pulse
285Disable automatic ~/.config/pulse init, for complex setups such as remote
286pulse servers or non-standard socket paths.
287.TP
288\fBkeep-dev-shm
289/dev/shm directory is untouched (even with private-dev).
290.TP
291\fBkeep-shell-rc
292Do not copy shell rc files (such as ~/.bashrc and ~/.zshrc) from /etc/skel.
293.TP
294\fBkeep-var-tmp
295/var/tmp directory is untouched.
296.TP
297\fBmkdir directory
298Create a directory in user home, under /tmp, or under /run/user/<UID> before the sandbox is started.
299The directory is created if it doesn't already exist.
300.br
301
302.br
303Use this command for whitelisted directories you need to preserve
304when the sandbox is closed. Without it, the application will create the directory, and the directory
305will be deleted when the sandbox is closed. Subdirectories are recursively created. Example from
306firefox profile:
307.br
308
309.br
310mkdir ~/.mozilla
311.br
312whitelist ~/.mozilla
313.br
314mkdir ~/.cache/mozilla/firefox
315.br
316whitelist ~/.cache/mozilla/firefox
317.br
318
319.br
320For files in /run/user/<PID> use ${RUNUSER} macro:
321.br
322
323.br
324mkdir ${RUNUSER}/firejail-testing
325.TP
326\fBmkfile file
327Similar to mkdir, this command creates an empty file in user home, or /tmp, or under /run/user/<UID>
328before the sandbox is started. The file is created if it doesn't already exist.
329.TP
330\fBnoexec file_or_directory
331Remount the file or the directory noexec, nodev and nosuid.
332#ifdef HAVE_OVERLAYFS
333.TP
334\fBoverlay
335Mount a filesystem overlay on top of the current filesystem.
336The overlay is stored in $HOME/.firejail/<PID> directory.
337.TP
338\fBoverlay-named name
339Mount a filesystem overlay on top of the current filesystem.
340The overlay is stored in $HOME/.firejail/name directory.
341.TP
342\fBoverlay-tmpfs
343Mount a filesystem overlay on top of the current filesystem.
344All filesystem modifications are discarded when the sandbox is closed.
345#endif
346.TP
347\fBprivate
348Mount new /root and /home/user directories in temporary
349filesystems. All modifications are discarded when the sandbox is
350closed.
351.TP
352\fBprivate directory
353Use directory as user home.
354--private and --private=directory cannot be used together.
355.br
356
357.br
358Bug: Even with this enabled, some commands (such as mkdir, mkfile and
359private-cache) will still operate on the original home directory.
360Workaround: Disable the incompatible commands, such as by using "ignore mkdir"
361and "ignore mkfile".
362For details, see
363.UR https://github.com/netblue30/firejail/issues/903
364#903
365.UE
366.TP
367\fBprivate-bin file,file
368Build a new /bin in a temporary filesystem, and copy the programs in the list.
369The files in the list must be expressed as relative to the /bin,
370/sbin, /usr/bin, /usr/sbin, or /usr/local/bin directories.
371The same directory is also bind-mounted over /sbin, /usr/bin and /usr/sbin.
372Multiple private-bin commands are allowed and they accumulate.
373.TP
374\fBprivate-cache
375Mount an empty temporary filesystem on top of the .cache directory in user home. All
376modifications are discarded when the sandbox is closed.
377.TP
378\fBprivate-cwd
379Set working directory inside jail to the home directory, and failing that, the root directory.
380.TP
381\fBprivate-cwd directory
382Set working directory inside the jail. Full directory path is required. Symbolic links are not allowed.
383.TP
384\fBprivate-dev
385Create a new /dev directory. Only disc, dri, dvb, hidraw, null, full, zero, tty, pts, ptmx,
386random, snd, urandom, video, log, shm and usb devices are available.
387Use the options no3d, nodvd, nosound, notv, nou2f and novideo for additional restrictions.
388
389.TP
390\fBprivate-etc file,directory
391Build a new /etc in a temporary
392filesystem, and copy the files and directories in the list.
393The files and directories in the list must be expressed as relative to
394the /etc directory, and must not contain the / character
395(e.g., /etc/foo must be expressed as foo, but /etc/foo/bar --
396expressed as foo/bar -- is disallowed).
397All modifications are discarded when the sandbox is closed.
398Multiple private-etc commands are allowed and they accumulate.
399#ifdef HAVE_PRIVATE_HOME
400.TP
401\fBprivate-home file,directory
402Build a new user home in a temporary
403filesystem, and copy the files and directories in the list in the
404new home.
405The files and directories in the list must be expressed as relative to
406the current user's home directory.
407All modifications are discarded when the sandbox is
408closed.
409#endif
410#ifdef HAVE_PRIVATE_LIB
411.TP
412\fBprivate-lib file,directory
413Build a new /lib directory and bring in the libraries required by the application to run.
414The files and directories in the list must be expressed as relative to
415the /lib directory.
416This feature is still under development, see \fBman 1 firejail\fR for some examples.
417#endif
418.TP
419\fBprivate-opt file,directory
420Build a new /opt in a temporary
421filesystem, and copy the files and directories in the list.
422The files and directories in the list must be expressed as relative to
423the /opt directory, and must not contain the / character
424(e.g., /opt/foo must be expressed as foo, but /opt/foo/bar --
425expressed as foo/bar -- is disallowed).
426All modifications are discarded when the sandbox is closed.
427.TP
428\fBprivate-srv file,directory
429Build a new /srv in a temporary
430filesystem, and copy the files and directories in the list.
431The files and directories in the list must be expressed as relative to
432the /srv directory, and must not contain the / character
433(e.g., /srv/foo must be expressed as foo, but /srv/foo/bar --
434expressed as foo/bar -- is disallowed).
435All modifications are discarded when the sandbox is closed.
436.TP
437\fBprivate-tmp
438Mount an empty temporary filesystem on top of /tmp directory whitelisting /tmp/.X11-unix.
439.TP
440\fBread-only file_or_directory
441Make directory or file read-only.
442.TP
443\fBread-write file_or_directory
444Make directory or file read-write.
445.TP
446\fBtmpfs directory
447Mount an empty tmpfs filesystem on top of directory. Directories outside user home or not owned by the user are not allowed. Sandboxes running as root are exempt from these restrictions.
448.TP
449\fBtracelog
450Blacklist violations logged to syslog.
451.TP
452\fBwhitelist file_or_directory
453Whitelist directory or file. A temporary file system is mounted on the top directory, and the
454whitelisted files are mount-binded inside. Modifications to whitelisted files are persistent,
455everything else is discarded when the sandbox is closed. The top directory can be
456all directories in / (except /proc and /sys), /sys/module, /run/user/$UID, $HOME and
457all directories in /usr.
458.br
459
460.br
461Symbolic link handling: with the exception of user home, both the link and the real file should be in
462the same top directory. For user home, both the link and the real file should be owned by the user.
463
464.TP
465\fBwhitelist-ro file_or_directory
466Equivalent to "whitelist file_or_directory" followed by "read-only file_or_directory"
467
468.TP
469\fBwritable-etc
470Mount /etc directory read-write.
471.TP
472\fBwritable-run-user
473Disable the default blacklisting of run/user/$UID/systemd and /run/user/$UID/gnupg.
474.TP
475\fBwritable-var
476Mount /var directory read-write.
477.TP
478\fBwritable-var-log
479Use the real /var/log directory, not a clone. By default, a tmpfs is mounted on top of /var/log
480directory, and a skeleton filesystem is created based on the original /var/log.
481
482.SH Security filters
483The following security filters are currently implemented:
484
485.TP
486\fBallow-debuggers
487Allow tools such as strace and gdb inside the sandbox by whitelisting system calls ptrace and process_vm_readv.
488#ifdef HAVE_APPARMOR
489.TP
490\fBapparmor
491Enable AppArmor confinement with the "firejail-default" AppArmor profile.
492.TP
493\fBapparmor profile_name
494Enable AppArmor confinement with a custom AppArmor profile.
495Note that the profile in question must already be loaded into the kernel.
496#endif
497.TP
498\fBcaps
499Enable default Linux capabilities filter.
500See capabilities(7) for details.
501.TP
502\fBcaps.drop capability,capability,capability
503Blacklist given Linux capabilities.
504.TP
505\fBcaps.drop all
506Blacklist all Linux capabilities.
507.TP
508\fBcaps.keep capability,capability,capability
509Whitelist given Linux capabilities.
510.TP
511\fBmemory-deny-write-execute
512Install a seccomp filter to block attempts to create memory mappings
513that are both writable and executable, to change mappings to be
514executable or to create executable shared memory.
515.TP
516\fBnonewprivs
517Sets the NO_NEW_PRIVS prctl. This ensures that child processes
518cannot acquire new privileges using execve(2); in particular,
519this means that calling a suid binary (or one with file capabilities)
520does not result in an increase of privilege.
521.TP
522\fBnoprinters
523Disable printers.
524#ifdef HAVE_USERNS
525.TP
526\fBnoroot
527Use this command to enable an user namespace. The namespace has only one user, the current user.
528There is no root account (uid 0) defined in the namespace.
529#endif
530.TP
531\fBprotocol protocol1,protocol2,protocol3
532Enable protocol filter. The filter is based on seccomp and checks the
533first argument to socket system call. Recognized values: \fBunix\fR,
534\fBinet\fR, \fBinet6\fR, \fBnetlink\fR, \fBpacket\fR, and \fBbluetooth\fR.
535Multiple protocol commands are allowed and they accumulate.
536.TP
537\fBrestrict-namespaces
538Install a seccomp filter that blocks attempts to create new cgroup, ipc, net, mount, pid, time, user or uts namespaces.
539.TP
540\fBrestrict-namespaces cgroup,ipc,net,mnt,pid,time,user,uts
541Install a seccomp filter that blocks attempts to create any of the specified namespaces.
542.TP
543\fBseccomp
544Enable seccomp filter and blacklist the syscalls in the default list. See man 1 firejail for more details.
545.TP
546\fBseccomp.32
547Enable seccomp filter and blacklist the syscalls in the default list for 32 bit system calls on a 64 bit architecture system.
548.TP
549\fBseccomp syscall,syscall,syscall
550Enable seccomp filter and blacklist the system calls in the list on top of default seccomp filter.
551.TP
552\fBseccomp.32 syscall,syscall,syscall
553Enable seccomp filter and blacklist the system calls in the list on top of default seccomp filter for 32 bit system calls on a 64 bit architecture system.
554.TP
555\fBseccomp.block-secondary
556Enable seccomp filter and filter system call architectures
557so that only the native architecture is allowed.
558.TP
559\fBseccomp.drop syscall,syscall,syscall
560Enable seccomp filter and blacklist the system calls in the list.
561.TP
562\fBseccomp.32.drop syscall,syscall,syscall
563Enable seccomp filter and blacklist the system calls in the list for 32 bit system calls on a 64 bit architecture system.
564.TP
565\fBseccomp.keep syscall,syscall,syscall
566Enable seccomp filter and whitelist the system calls in the list.
567.TP
568\fBseccomp.32.keep syscall,syscall,syscall
569Enable seccomp filter and whitelist the system calls in the list for 32 bit system calls on a 64 bit architecture system.
570.TP
571\fBseccomp-error-action kill | log | ERRNO
572Return a different error instead of EPERM to the process, kill it when
573an attempt is made to call a blocked system call, or allow but log the
574attempt.
575#ifdef HAVE_X11
576.TP
577\fBx11
578Enable X11 sandboxing.
579.TP
580\fBx11 none
581Blacklist /tmp/.X11-unix directory, ${HOME}/.Xauthority and file specified in ${XAUTHORITY} environment variable.
582Remove DISPLAY and XAUTHORITY environment variables.
583Stop with error message if X11 abstract socket will be accessible in jail.
584.TP
585\fBx11 xephyr
586Enable X11 sandboxing with Xephyr server.
587.TP
588\fBx11 xorg
589Enable X11 sandboxing with X11 security extension.
590.TP
591\fBx11 xpra
592Enable X11 sandboxing with Xpra server.
593.TP
594\fBx11 xvfb
595Enable X11 sandboxing with Xvfb server.
596.TP
597\fBxephyr-screen WIDTHxHEIGHT
598Set screen size for x11 xephyr. This command should be included in the profile file before x11 xephyr command.
599.br
600
601.br
602Example:
603.br
604
605.br
606xephyr-screen 640x480
607.br
608x11 xephyr
609#endif
610#ifdef HAVE_DBUSPROXY
611.SH DBus filtering
612
613Access to the session and system DBus UNIX sockets can be allowed, filtered or
614disabled. To disable the abstract sockets (and force applications to use the
615filtered UNIX socket) you would need to request a new network namespace using
616\-\-net command. Another option is to remove unix from the \-\-protocol set.
617.br
618
619.br
620Filtering requires installing the xdg-dbus-proxy utility. Filter rules can be
621specified for well-known DBus names, but they are also propagated to the owning
622unique name, too. The permissions are "sticky" and are kept even if the
623corresponding well-known name is released (however, applications rarely release
624well-known names in practice). Names may have a .* suffix to match all names
625underneath them, including themselves (e.g. "foo.bar.*" matches "foo.bar",
626"foo.bar.baz" and "foo.bar.baz.quux", but not "foobar"). For more information,
627see xdg-dbus-proxy(1).
628.br
629
630.br
631Examples:
632
633.TP
634\fBdbus-system filter
635Enable filtered access to the system DBus. Filters can be specified with the dbus-system.talk and dbus-system.own commands.
636.TP
637\fBdbus-system none
638Disable access to the system DBus. Once access is disabled, it cannot be relaxed to filtering.
639.TP
640\fBdbus-system.own org.gnome.ghex.*
641Allow the application to own the name org.gnome.ghex and all names underneath in on the system DBus.
642.TP
643\fBdbus-system.talk org.freedesktop.Notifications
644Allow the application to talk to the name org.freedesktop.Notifications on the system DBus.
645.TP
646\fBdbus-system.see org.freedesktop.Notifications
647Allow the application to see but not talk to the name org.freedesktop.Notifications on the system DBus.
648.TP
649\fBdbus-system.call org.freedesktop.Notifications=org.freedesktop.Notifications.*@/org/freedesktop/Notifications
650Allow the application to call methods of the interface org.freedesktop.Notifications of the object exposed at the path /org/freedesktop/Notifications by the client owning the bus name org.freedesktop.Notifications on the system DBus.
651.TP
652\fBdbus-system.broadcast org.freedesktop.Notifications=org.freedesktop.Notifications.*@/org/freedesktop/Notifications
653Allow the application to receive broadcast signals from the interface org.freedesktop.Notifications of the object exposed at the path /org/freedesktop/Notifications by the client owning the bus name org.freedesktop.Notifications on the system DBus.
654.TP
655\fBdbus-user filter
656Enable filtered access to the session DBus. Filters can be specified with the dbus-user.talk and dbus-user.own commands.
657.TP
658\fBdbus-user none
659Disable access to the session DBus. Once access is disabled, it cannot be relaxed to filtering.
660.TP
661\fBdbus-user.own org.gnome.ghex.*
662Allow the application to own the name org.gnome.ghex and all names underneath in on the session DBus.
663.TP
664\fBdbus-user.talk org.freedesktop.Notifications
665Allow the application to talk to the name org.freedesktop.Notifications on the session DBus.
666.TP
667\fBdbus-user.see org.freedesktop.Notifications
668Allow the application to see but not talk to the name org.freedesktop.Notifications on the session DBus.
669.TP
670\fBdbus-user.call org.freedesktop.Notifications=org.freedesktop.Notifications.*@/org/freedesktop/Notifications
671Allow the application to call methods of the interface org.freedesktop.Notifications of the object exposed at the path /org/freedesktop/Notifications by the client owning the bus name org.freedesktop.Notifications on the session DBus.
672.TP
673\fBdbus-user.broadcast org.freedesktop.Notifications=org.freedesktop.Notifications.*@/org/freedesktop/Notifications
674Allow the application to receive broadcast signals from the the interface org.freedesktop.Notifications of the object exposed at the path /org/freedesktop/Notifications by the client owning the bus name org.freedesktop.Notifications on the session DBus.
675.TP
676\fBnodbus \fR(deprecated)
677Disable D-Bus access (both system and session buses). Equivalent to dbus-system none and dbus-user none.
678.TP
679.br
680
681.br
682Individual filters can be overridden via the \-\-ignore command. Supposing a profile has
683.br
684[...]
685.br
686dbus-user filter
687.br
688dbus-user.own org.mozilla.firefox.*
689.br
690dbus-user.talk org.freedesktop.Notifications
691.br
692dbus-system none
693.br
694[...]
695.br
696
697.br
698and the user wants to disable notifications, this can be achieved by putting the below in a local override file:
699.br
700[...]
701.br
702ignore dbus-user.talk org.freedesktop.Notifications
703.br
704[...]
705#endif
706.SH Resource limits, CPU affinity
707These profile entries define the limits on system resources (rlimits) for the processes inside the sandbox.
708The limits can be modified inside the sandbox using the regular \fBulimit\fR command. \fBcpu\fR command
709configures the CPU cores available.
710
711Examples:
712
713.TP
714\fBcpu 0,1,2
715Use only CPU cores 0, 1 and 2.
716.TP
717\fBnice -5
718Set a nice value of -5 to all processes running inside the sandbox.
719.TP
720\fBrlimit-as 123456789012
721Set the maximum size of the process's virtual memory to 123456789012 bytes.
722.TP
723\fBrlimit-cpu 123
724Set the maximum CPU time in seconds.
725.TP
726\fBrlimit-fsize 1024
727Set the maximum file size that can be created by a process to 1024 bytes.
728.TP
729\fBrlimit-nproc 1000
730Set the maximum number of processes that can be created for the real user ID of the calling process to 1000.
731.TP
732\fBrlimit-nofile 500
733Set the maximum number of files that can be opened by a process to 500.
734.TP
735\fBrlimit-sigpending 200
736Set the maximum number of processes that can be created for the real user ID of the calling process to 200.
737.TP
738\fBtimeout hh:mm:ss
739Kill the sandbox automatically after the time has elapsed. The time is specified in hours/minutes/seconds format.
740
741.SH User Environment
742.TP
743\fBallusers
744All user home directories are visible inside the sandbox. By default, only current user home directory is visible.
745
746.TP
747\fBenv name=value
748Set environment variable. Examples:
749.br
750
751.br
752env LD_LIBRARY_PATH=/opt/test/lib
753.br
754env CFLAGS="-W -Wall -Werror"
755
756.TP
757\fBipc-namespace
758Enable IPC namespace.
759
760.TP
761\fBkeep-fd
762Inherit open file descriptors to sandbox.
763
764.TP
765\fBname sandboxname
766Set sandbox name. Example:
767.br
768
769.br
770name browser
771
772.TP
773\fBno3d
774Disable 3D hardware acceleration.
775.TP
776\fBnoautopulse \fR(deprecated)
777See keep-config-pulse.
778.TP
779\fBnodvd
780Disable DVD and audio CD devices.
781.TP
782\fBnogroups
783Disable supplementary user groups
784.TP
785\fBnoinput
786Disable input devices.
787.TP
788\fBnosound
789Disable sound system.
790.TP
791\fBnotv
792Disable DVB (Digital Video Broadcasting) TV devices.
793.TP
794\fBnou2f
795Disable U2F devices.
796.TP
797\fBnovideo
798Disable video capture devices.
799.TP
800\fBmachine-id
801Spoof id number in /etc/machine-id file - a new random id is generated inside the sandbox.
802.TP
803\fBshell none
804Run the program directly, without a shell.
805
806
807#ifdef HAVE_NETWORK
808.SH Networking
809Networking features available in profile files.
810
811.TP
812\fBdefaultgw address
813Use this address as default gateway in the new network namespace.
814
815.TP
816\fBdns address
817Set a DNS server for the sandbox. Up to three DNS servers can be defined.
818
819.TP
820\fBhostname name
821Set a hostname for the sandbox.
822
823.TP
824\fBhosts-file file
825Use file as /etc/hosts.
826
827.TP
828\fBip address
829Assign IP addresses to the last network interface defined by a net command. A
830default gateway is assigned by default.
831.br
832
833.br
834Example:
835.br
836net eth0
837.br
838ip 10.10.20.56
839
840.TP
841\fBip none
842No IP address and no default gateway are configured for the last interface
843defined by a net command. Use this option
844in case you intend to start an external DHCP client in the sandbox.
845.br
846
847.br
848Example:
849.br
850net eth0
851.br
852ip none
853
854.TP
855\fBip dhcp
856Acquire an IP address and default gateway for the last interface defined by a
857net command, as well as set the DNS servers according to the DHCP response.
858This command requires the ISC dhclient DHCP client to be installed and will start
859it automatically inside the sandbox.
860.br
861
862.br
863Example:
864.br
865net br0
866.br
867ip dhcp
868.br
869
870.br
871This command should not be used in conjunction with the dns command if the
872DHCP server is set to configure DNS servers for the clients, because the
873manually specified DNS servers will be overwritten.
874
875.br
876The DHCP client will NOT release the DHCP lease when the sandbox terminates.
877If your DHCP server requires leases to be explicitly released, consider running
878a DHCP client and releasing the lease manually in conjunction with the
879net none command.
880
881.TP
882\fBip6 address
883Assign IPv6 addresses to the last network interface defined by a net command.
884.br
885
886.br
887Example:
888.br
889net eth0
890.br
891ip6 2001:0db8:0:f101::1/64
892
893.TP
894\fBip6 dhcp
895Acquire an IPv6 address and default gateway for the last interface defined by a
896net command, as well as set the DNS servers according to the DHCP response.
897This command requires the ISC dhclient DHCP client to be installed and will start
898it automatically inside the sandbox.
899.br
900
901.br
902Example:
903.br
904net br0
905.br
906ip6 dhcp
907.br
908
909.br
910This command should not be used in conjunction with the dns command if the
911DHCP server is set to configure DNS servers for the clients, because the
912manually specified DNS servers will be overwritten.
913
914.br
915The DHCP client will NOT release the DHCP lease when the sandbox terminates.
916If your DHCP server requires leases to be explicitly released, consider running
917a DHCP client and releasing the lease manually.
918
919.TP
920\fBiprange address,address
921Assign an IP address in the provided range to the last network
922interface defined by a net command. A default gateway is assigned by default.
923.br
924
925.br
926Example:
927.br
928
929.br
930net eth0
931.br
932iprange 192.168.1.150,192.168.1.160
933.br
934
935.TP
936\fBmac address
937Assign MAC addresses to the last network interface defined by a net command.
938
939.TP
940\fBmtu number
941Assign a MTU value to the last network interface defined by a net command.
942
943.TP
944\fBnet bridge_interface
945Enable a new network namespace and connect it to this bridge interface.
946Unless specified with option \-\-ip and \-\-defaultgw, an IP address and a default gateway will be assigned
947automatically to the sandbox. The IP address is verified using ARP before assignment. The address
948configured as default gateway is the bridge device IP address. Up to four \-\-net
949bridge devices can be defined. Mixing bridge and macvlan devices is allowed.
950
951.TP
952\fBnet ethernet_interface|wireless_interface
953Enable a new network namespace and connect it
954to this ethernet interface using the standard Linux macvlan or ipvlan
955driver. Unless specified with option \-\-ip and \-\-defaultgw, an
956IP address and a default gateway will be assigned automatically
957to the sandbox. The IP address is verified using ARP before
958assignment. The address configured as default gateway is the
959default gateway of the host. Up to four \-\-net devices can
960be defined. Mixing bridge and macvlan devices is allowed.
961
962.TP
963\fBnet none
964Enable a new, unconnected network namespace. The only interface
965available in the new namespace is a new loopback interface (lo).
966Use this option to deny network access to programs that don't
967really need network access.
968
969.TP
970\fBnet tap_interface
971Enable a new network namespace and connect it
972to this ethernet tap interface using the standard Linux macvlan
973driver. If the tap interface is not configured, the sandbox
974will not try to configure the interface inside the sandbox.
975Please use ip, netmask and defaultgw to specify the configuration.
976
977.TP
978\fBnetfilter
979If a new network namespace is created, enabled default network filter.
980
981.TP
982\fBnetfilter filename
983If a new network namespace is created, enabled the network filter in filename.
984
985.TP
986\fBnetlock
987Generate a custom network filter and enable it.
988
989
990.TP
991\fBnetmask address
992Use this option when you want to assign an IP address in a new namespace and
993the parent interface specified by --net is not configured. An IP address and
994a default gateway address also have to be added.
995
996.TP
997\fBnetns namespace
998Run the program in a named, persistent network namespace. These can
999be created and configured using "ip netns".
1000
1001.TP
1002\fBveth-name name
1003Use this name for the interface connected to the bridge for --net=bridge_interface commands,
1004instead of the default one.
1005#endif
1006
1007.SH Other
1008.TP
1009\fBdeterministic-exit-code
1010Always exit firejail with the first child's exit status. The default behavior is to use the exit status of the final child to exit, which can be nondeterministic.
1011
1012.TP
1013\fBdeterministic-shutdown
1014Always shut down the sandbox after the first child has terminated. The default behavior is to keep the sandbox alive as long as it contains running processes.
1015
1016.TP
1017\fBjoin-or-start sandboxname
1018Join the sandbox identified by name or start a new one.
1019Same as "firejail --join=sandboxname" command if sandbox with specified name exists, otherwise same as "name sandboxname".
1020
1021.SH FILES
1022.TP
1023\fB/etc/firejail/appname.profile
1024Global Firejail configuration consisting mainly of profiles for each application supported by default.
1025
1026.TP
1027\fB$HOME/.config/firejail/appname.profile
1028User application profiles, will take precedence over the global profiles.
1029
1030.TP
1031\fB/usr/share/doc/firejail/profile.template
1032Template for building new profiles.
1033
1034.TP
1035\fB/usr/share/doc/firejail/redirect_alias-profile.template
1036Template for aliasing/redirecting profiles.
1037
1038.SH LICENSE
1039Firejail is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
1040.PP
1041Homepage: https://firejail.wordpress.com
1042.SH SEE ALSO
1043.BR firejail (1),
1044.BR firemon (1),
1045.BR firecfg (1),
1046.BR firejail-login (5),
1047.BR firejail-users (5),
1048.BR jailcheck (1)
1049
1050.UR https://github.com/netblue30/firejail/wiki/Creating-Profiles
1051.UE
1052.\" vim: set filetype=groff :