@@ -248,7 +248,21 @@ for more details.
248
248
Examples:
249
249
.TP
250
250
\fB blacklist file_or_directory
251
- Blacklist directory or file. Examples:
251
+ Blacklist directory or file. This makes a file or directory
252
+ completely inaccessible. All other files and directories are unaffected.
253
+ The blacklisted file or directory is still visible on the filesystem,
254
+ even if it's inaccessible.
255
+ .br
256
+
257
+ .br
258
+ Symbolic link handling: Blacklisting a path that is a symbolic link will also
259
+ blacklist the path that it points to.
260
+ For example, if ~/foo is blacklisted and it points to /bar, then /bar will also
261
+ be blacklisted.
262
+ .br
263
+
264
+ .br
265
+ Examples:
252
266
.br
253
267
254
268
.br
@@ -452,16 +466,36 @@ Mount an empty tmpfs filesystem on top of directory. Directories outside user ho
452
466
Blacklist violations logged to syslog.
453
467
.TP
454
468
\fB whitelist file_or_directory
455
- Whitelist directory or file. A temporary file system is mounted on the top directory, and the
456
- whitelisted files are mount-binded inside. Modifications to whitelisted files are persistent,
457
- everything else is discarded when the sandbox is closed. The top directory can be
458
- all directories in / (except /proc and /sys), /sys/module, /run/user/$UID, $HOME and
459
- all directories in /usr.
469
+ Whitelist directory or file. A temporary file system is mounted on the top directory.
470
+ In the context of firejail, top directory means, if the whitelisted file's path is
471
+ for example /etc/somedir/somefile, then the top directory would be /etc.
472
+ All other top directories like /opt, /usr and so on, haven't changed, so all files there
473
+ are still accessible, unless a file or directory inside them is also whitelisted.
474
+ This is why sometimes it's beneficial to use blacklist in combination with whitelist,
475
+ if used for different top directories.
460
476
.br
461
477
462
478
.br
463
- Symbolic link handling: with the exception of user home, both the link and the real file should be in
464
- the same top directory. For user home, both the link and the real file should be owned by the user.
479
+ The whitelisted files are mount-binded inside. Modifications to whitelisted files are
480
+ persistent, everything else in the same top directory is discarded when the sandbox is closed.
481
+ .br
482
+
483
+ .br
484
+ The top directory can be most directories in /, but there are some special cases.
485
+ The /proc and /sys top directories aren't allowed, but /sys/module is allowed.
486
+ Also /run/user/$UID, $HOME and all directories in /usr are treated as a top directory.
487
+ .br
488
+
489
+ .br
490
+ Symbolic link handling: Whitelisting a path that is a symbolic link will also
491
+ whitelist the path that it points to.
492
+ For example, if ~/foo is whitelisted and it points to ~/bar, then ~/bar will
493
+ also be whitelisted.
494
+ .br
495
+ Restrictions: With the exception of the user home directory, both the link and
496
+ the real file should be in the same top directory.
497
+ For symbolic links in the user home directory, both the link and the real file
498
+ should be owned by the user.
465
499
466
500
.TP
467
501
\fB whitelist-ro file_or_directory
0 commit comments