aboutsummaryrefslogtreecommitdiffstats
path: root/src/man/firejail-profile.txt
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-12-04 12:36:44 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2015-12-04 12:36:44 -0500
commit129af459ad895b329afb62f3fe9cbcbd6a578072 (patch)
treeb5ac2a42b2b6ca9c2ecb503c0fe4411f37fe5382 /src/man/firejail-profile.txt
parent--tracelog work (diff)
downloadfirejail-129af459ad895b329afb62f3fe9cbcbd6a578072.tar.gz
firejail-129af459ad895b329afb62f3fe9cbcbd6a578072.tar.zst
firejail-129af459ad895b329afb62f3fe9cbcbd6a578072.zip
--profile-path option
Diffstat (limited to 'src/man/firejail-profile.txt')
-rw-r--r--src/man/firejail-profile.txt88
1 files changed, 55 insertions, 33 deletions
diff --git a/src/man/firejail-profile.txt b/src/man/firejail-profile.txt
index 1713b74dd..91c151fe8 100644
--- a/src/man/firejail-profile.txt
+++ b/src/man/firejail-profile.txt
@@ -81,7 +81,7 @@ file in user home directory.
81Example: "include ${HOME}/myprofiles/profile1" will load "~/myprofiles/profile1" file. 81Example: "include ${HOME}/myprofiles/profile1" will load "~/myprofiles/profile1" file.
82 82
83.TP 83.TP
84\f\noblacklist file_name 84\f\ noblacklist file_name
85If the file name matches file_name, the file will not be blacklisted in any blacklist commands that follow. 85If the file name matches file_name, the file will not be blacklisted in any blacklist commands that follow.
86 86
87Example: "noblacklist ${HOME}/.mozilla" 87Example: "noblacklist ${HOME}/.mozilla"
@@ -102,37 +102,31 @@ Use \fBprivate\fR to set private mode.
102File globbing is supported, and PATH and HOME directories are searched. 102File globbing is supported, and PATH and HOME directories are searched.
103Examples: 103Examples:
104.TP 104.TP
105\f\blacklist /usr/bin 105\f\blacklist file_or_directory
106Remove /usr/bin directory. 106Blacklist directory or file. Examples:
107.TP 107.br
108\f\blacklist /etc/passwd 108
109Remove /etc/passwd file. 109.br
110.TP 110blacklist /usr/bin
111\f\read-only /etc/passwd 111.br
112Read-only /etc/passwd file. 112blacklist /usr/bin/gcc*
113.TP 113.br
114tmpfs /etc 114blacklist ${PATH}/ifconfig
115Mount an empty tmpfs filesystem on top of /etc directory. 115.br
116.TP 116blacklist ${HOME}/.ssh
117bind /root/config/ssh,/etc/ssh 117
118Mount-bind /root/config/ssh on /etc/ssh.
119.TP 118.TP
120\f\blacklist /usr/bin/gcc* 119\f\read-only file_or_directory
121Remove all gcc files in /usr/bin (file globbing). 120Make directory or file read-only.
122.TP 121.TP
123\f\blacklist ${PATH}/ifconfig 122\f\ tmpfs directory
124Remove ifconfig command from the regular path directories. 123Mount an empty tmpfs filesystem on top of directory.
125.TP 124.TP
126\f\blacklist ${HOME}/.ssh 125\f\bind directory1,directory2
127Remove .ssh directory from user home directory. 126Mount-bind directory1 on top of directory2. This option is only available when running as root.
128.TP 127.TP
129\f\noblacklist ${HOME}/config/evince 128\f\bind file1,file2
130Prevent any new blacklist commands from blacklisting 129Mount-bind file1 on top of file2. This option is only available when running as root.
131config/evince in the user home directory. Useful for defining
132exceptions before including a large blacklist from a file. Note
133that blacklisting ${HOME}/config can still make
134${HOME}/config/evince effectively unreachable through filesystem
135traversal.
136.TP 130.TP
137\f\private 131\f\private
138Mount new /root and /home/user directories in temporary 132Mount new /root and /home/user directories in temporary
@@ -153,7 +147,7 @@ new home. All modifications are discarded when the sandbox is
153closed. 147closed.
154.TP 148.TP
155\f\private-dev 149\f\private-dev
156Create a new /dev directory. Only null, full, zero, tty, pts, ptmx, random, urandom and shm devices are available. 150Create a new /dev directory. Only dri, null, full, zero, tty, pts, ptmx, random, urandom, log and shm devices are available.
157.TP 151.TP
158\f\private-etc file,directory 152\f\private-etc file,directory
159Build a new /etc in a temporary 153Build a new /etc in a temporary
@@ -240,10 +234,8 @@ The sandbox is placed in g1 control group.
240.SH User Environment 234.SH User Environment
241 235
242.TP 236.TP
243env LD_LIBRARY_PATH=/opt/test/lib 237env name=value
244Set environment variable. 238Set environment variable. Examples:
245.br
246Examples:
247.br 239.br
248 240
249.br 241.br
@@ -284,6 +276,36 @@ Set a DNS server for the sandbox. Up to three DNS servers can be defined.
284hostname name 276hostname name
285Set a hostname for the sandbox. 277Set a hostname for the sandbox.
286 278
279.SH RELOCATING PROFILES
280For various reasons some users might want to keep the profile files in a different directory.
281Using \fB--profile-path\fR command line option, Firejail can be instructed to look for profiles
282into this directory.
283
284This is an example of relocating the profile files into a new
285directory, /home/netblue/myprofiles. Start by creating the new directory and copy all
286the profile files in:
287.br
288
289.br
290$ mkdir ~/myprofiles && cd ~/myprofiles && cp /etc/firejail/* .
291.br
292
293.br
294Using \fBsed\fR utility, modify the absolute paths for \fBinclude\fR commands:
295.br
296
297.br
298$ sed -i "s/\\/etc\\/firejail/\\/home\\/netblue\\/myprofiles/g" *.profile
299.br
300$ sed -i "s/\\/etc\\/firejail/\\/home\\/netblue\\/myprofiles/g" *.inc
301.br
302
303.br
304Start Firejail using the new path:
305.br
306
307.br
308$ firejail --profile-path=~/myprofile
287 309
288.SH FILES 310.SH FILES
289/etc/firejail/filename.profile, $HOME/.config/firejail/filename.profile 311/etc/firejail/filename.profile, $HOME/.config/firejail/filename.profile