aboutsummaryrefslogtreecommitdiffstats
path: root/src/man/firejail-profile.txt
blob: 7be5304c185e26e5e7cde7cddec9c714e9a22c4b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
.TH FIREJAIL-PROFILE 5 "MONTH YEAR" "VERSION" "firejail profiles man page"
.SH NAME
profile \- Profile file syntax for Firejail

.SH USAGE
.TP
firejail \-\-profile=filename.profile

.SH DESCRIPTION
Several Firejail command line configuration options can be passed to the program using
profile files. Default Firejail profile files are stored in /etc/firejail
directory and ~/.config/firejail directory.

.SH Scripting
Include and comment support:

.TP
\f\include other.profile exclude-token
Include other.profile file. exclude-token disables blacklist commands in other.profile
if exclude-token word is found in the name section of blacklist command.
exclude-token is optional.

Example: "include /etc/firejail/disable-common.inc .filezilla"
loads disable-common.inc file disables "blacklist ${HOME}/.filezilla" command in this file.

other.profile file name can be prefixed with ${HOME}. This will force Firejail to look for the
file in user home directory.

Example: "include ${HOME}/myprofiles/profile1" will load "~/myprofiles/profile1" file.

.TP
# this is a comment

.SH Filesystem
These profile entries define a chroot filesystem built on top of the existing
host filesystem. Each line describes a file element that is removed from
the filesystem (\fBblacklist\fR), a read-only file or directory (\fBread-only\fR),
a tmpfs mounted on top of an existing directory (\fBtmpfs\fR),
or mount-bind a directory  or file on top of another directory or file (\fBbind\fR).
Use \fBprivate\fR to set private mode.
File globbing is supported, and PATH and HOME directories are searched.
Examples:
.TP
\f\blacklist /usr/bin
Remove /usr/bin directory.
.TP
\f\blacklist /etc/password
Remove /etc/password file.
.TP
\f\read-only /etc/password
Read-only /etc/password file.
.TP
tmpfs /etc
Mount an empty tmpfs filesystem on top of /etc directory.
.TP
bind /root/config/ssh,/etc/ssh
Mount-bind /root/config/ssh on /etc/ssh.
.TP
\f\blacklist /usr/bin/gcc*
Remove all gcc files in /usr/bin (file globbing).
.TP
\f\blacklist ${PATH}/ifconfig
Remove ifconfig command from the regular path directories.
.TP
\f\blacklist ${HOME}/.ssh
Remove .ssh directory from user home directory.
.TP
\f\private
Mount new /root and /home/user directories in temporary
filesystems. All modifications are discarded when the sandbox is
closed.
.TP
\f\private directory
Use directory as user home.
.TP
\f\private-home file,directory
Build a new user home in a temporary
filesystem, and copy the files and directories in the list in the
new home. All modifications are discarded when the sandbox is
closed.
.TP
\f\private-dev
Create a new /dev directory. Only null, full, zero, tty, pts, ptmx, random, urandom and shm devices are available.
.TP
\f\private-etc file,directory
Build a new /etc in a temporary
filesystem, and copy the files and directories in the list.
All modifications are discarded when the sandbox is closed.

.SH Filters
\fBcaps\fR and \fBseccomp\fR enable Linux capabilities and seccomp filters. Examples:

.TP
caps
Enable default Linux capabilities filter.
.TP
caps.drop all
Blacklist all Linux capabilities.
.TP
caps.keep capability,capability,capability
Blacklist Linux capabilities filter.
.TP
caps.drop capability,capability,capability
Whitelist Linux capabilities filter.
.TP
\f\seccomp
Enable default seccomp filter.  The default list is as follows:
mount, umount2, ptrace, kexec_load, open_by_handle_at, init_module, finit_module, delete_module,
iopl, ioperm, swapon, swapoff, syslog, process_vm_readv and process_vm_writev,
sysfs,_sysctl, adjtimex, clock_adjtime, lookup_dcookie, perf_event_open, fanotify_init and kcmp.
.TP
\f\seccomp syscall,syscall,syscall
Enable seccomp filter and blacklist the system calls in the list on top of default seccomp filter.
.TP
\f\seccomp.drop syscall,syscall,syscall
Enable seccomp filter and blacklist  the system calls in the list.
.TP
\f\seccomp.keep syscall,syscall,syscall
Enable seccomp filter and whitelist the system calls in the list.


.SH User Namespace
Use \fBnoroot\fR to enable an user namespace. The namespace has only one user, the current user.
There is no root account defined in the namespace.

.TP
noroot
Enable an user namespace without root user defined.


.SH Resource limits
These profile entries define the limits on system resources (rlimits) for the processes inside the sandbox.
The limits can be modified inside the sandbox using the regular \fBulimit\fR command. Examples:

.TP
\f\rlimit-fsize 1024
Set the maximum file size that can be created by a process to 1024 bytes.
.TP
\f\rlimit-nproc 1000
Set the maximum number of processes that can be created for the real user ID of the calling process to 1000.
.TP
\f\rlimit-nofile 500
Set the maximum number of files that can be opened by a process to 500.
.TP
\f\rlimit-sigpending 200
Set the maximum number of processes that can be created for the real user ID of the calling process to 200.

.SH CPU Affinity
Set the CPU cores available for this sandbox. Examples:

.TP
cpu 1,2,3
Use only CPU cores 0, 1 and 2.

.SH Control Groups
Place the sandbox in an existing control group specified by the full path of the task file. Example:

.TP
cgroup /sys/fs/cgroup/g1/tasks
The sandbox is placed in g1 control group.

.SH User Environment

.TP
nogroups
Disable supplementary user groups
.TP
shell none
Run the program directly, without a shell.

.SH Networking
Networking features available in profile files.

.TP
netfilter
If a new network namespace is created, enabled default network filter.

.TP
netfilter filename
If a new network namespace is created, enabled the network filter in filename.

.TP
dns address
Set a DNS server for the sandbox. Up to three DNS servers can be defined.


.SH FILES
/etc/firejail/filename.profile, $HOME/.config/firejail/filename.profile

.SH LICENSE
Firejail 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.
.PP
Homepage: http://firejail.sourceforge.net
.SH SEE ALSO
\&\flfirejail\fR\|(1),
\&\flfiremon\fR\|(1),
\&\flfirejail-login\fR\|(5)