[GH-ISSUE #1975] cannot open local profile file #1329

Closed
opened 2026-05-05 07:52:15 -06:00 by gitea-mirror · 35 comments
Owner

Originally created by @omega3 on GitHub (Jun 1, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1975

I tried:

firejail --profile=/etc/firejail/wine.profile --net=none wine start PDFXCview.exe
Reading /etc/firejail/wine.profile
Error: cannot open profile file

but I run wine on second user account. Does it make any difference? Is it permission issue?

Edit:
I loggin to first (sudo) user account and this also shows the same output

firejail --profile=/etc/firejail/wine.profile --net=none wine start notepad.exe
Reading /etc/firejail/wine.profile
Error: cannot open profile file

Is it a bug that firejail cannot read profiles in /etc/firejail/?

Originally created by @omega3 on GitHub (Jun 1, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/1975 I tried: ``` firejail --profile=/etc/firejail/wine.profile --net=none wine start PDFXCview.exe Reading /etc/firejail/wine.profile Error: cannot open profile file ``` but I run wine on second user account. Does it make any difference? Is it permission issue? Edit: I loggin to first (sudo) user account and this also shows the same output ``` firejail --profile=/etc/firejail/wine.profile --net=none wine start notepad.exe Reading /etc/firejail/wine.profile Error: cannot open profile file ``` Is it a bug that firejail cannot read profiles in /etc/firejail/?
gitea-mirror 2026-05-05 07:52:15 -06:00
Author
Owner

@Fred-Barclay commented on GitHub (Jun 4, 2018):

@omega3 Can I get some info from you?

  1. What distro and release are you using?
  2. What does firejail --version say?
  3. How about which firejail?
  4. What is the output of ls /etc/firejail?

Thanks!
Fred

<!-- gh-comment-id:394212324 --> @Fred-Barclay commented on GitHub (Jun 4, 2018): @omega3 Can I get some info from you? 1. What distro and release are you using? 2. What does `firejail --version` say? 3. How about `which firejail`? 4. What is the output of `ls /etc/firejail`? Thanks! Fred
Author
Owner

@SkewedZeppelin commented on GitHub (Jun 4, 2018):

@Fred-Barclay see https://github.com/netblue30/firejail/issues/1972#issuecomment-393581528

@omega3 how did you install Firejail from the Sourceforge downloads?

<!-- gh-comment-id:394214756 --> @SkewedZeppelin commented on GitHub (Jun 4, 2018): @Fred-Barclay see https://github.com/netblue30/firejail/issues/1972#issuecomment-393581528 @omega3 how did you install Firejail from the Sourceforge downloads?
Author
Owner

@omega3 commented on GitHub (Jun 4, 2018):

It is on Kubuntu 14.04 64-bit.

I installed firejail_0.9.54_1_amd64.deb from using dpkg -i
https://sourceforge.net/projects/firejail/files/firejail/
No errors during instalation.

It is strange but firejail --version shows firejail version 0.9.18-rc1.

I did apt-get purge and installed it once again and the package name is the same.

which firejail
/usr/local/bin/firejail

After reboot I have another problem. Firefox and Opera installed from deb that I was able to use so far with custom profile shows error:

firejail --profile=/media/data/backup/jailkonf/.config/jail.profile --seccomp --private=/media/data/backup/jail/ firefox
Reading /media/data/backup/jailkonf/.config/jail.profile
Error: cannot open profile file

/etc/firejail/

-rw-r--r-- 1 root root  2476 maj 16 14:40 firefox-common-addons.inc
-rw-r--r-- 1 root root  1865 maj 16 14:40 firefox-common.profile
-rw-r--r-- 1 root root   310 maj 16 14:40 firefox-developer-edition.profile
-rw-r--r-- 1 root root   282 maj 16 14:40 firefox-esr.profile
-rw-r--r-- 1 root root   290 maj 16 14:40 firefox-nightly.profile
-rw-r--r-- 1 root root   665 maj 16 14:40 firefox.profile
-rw-r--r-- 1 root root  4540 maj 16 14:40 firejail.config
<!-- gh-comment-id:394362816 --> @omega3 commented on GitHub (Jun 4, 2018): It is on Kubuntu 14.04 64-bit. I installed firejail_0.9.54_1_amd64.deb from using dpkg -i <package name> https://sourceforge.net/projects/firejail/files/firejail/ No errors during instalation. It is strange but firejail --version shows firejail version 0.9.18-rc1. I did apt-get purge and installed it once again and the package name is the same. ``` which firejail /usr/local/bin/firejail ``` After reboot I have another problem. Firefox and Opera installed from deb that I was able to use so far with custom profile shows error: ``` firejail --profile=/media/data/backup/jailkonf/.config/jail.profile --seccomp --private=/media/data/backup/jail/ firefox Reading /media/data/backup/jailkonf/.config/jail.profile Error: cannot open profile file ``` /etc/firejail/ ``` -rw-r--r-- 1 root root 2476 maj 16 14:40 firefox-common-addons.inc -rw-r--r-- 1 root root 1865 maj 16 14:40 firefox-common.profile -rw-r--r-- 1 root root 310 maj 16 14:40 firefox-developer-edition.profile -rw-r--r-- 1 root root 282 maj 16 14:40 firefox-esr.profile -rw-r--r-- 1 root root 290 maj 16 14:40 firefox-nightly.profile -rw-r--r-- 1 root root 665 maj 16 14:40 firefox.profile -rw-r--r-- 1 root root 4540 maj 16 14:40 firejail.config ```
Author
Owner

@omega3 commented on GitHub (Jun 5, 2018):

I deleted firejail from /usr/local/bin and installed again and now it shows correct version 0.9.54.

Update:
I read release notes and I did:
sudo firecfg
Then I added all my users to /etc/firejail/firejail.users
So it looks like:

user1
user2

On both accounts I am able to run

firejail --profile=/etc/firejail/firefox.profile firefox
Reading profile /etc/firejail/firefox.profile
Reading profile /etc/firejail/firefox-common.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/whitelist-common.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Parent pid 20121, child pid 20122
Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set.
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Post-exec seccomp protector enabled
Warning fseccomp: syscall "bpf" not available on this platform
Warning fseccomp: syscall "kcmp" not available on this platform
Warning fseccomp: syscall "ni_syscall" not available on this platform
Warning fseccomp: syscall "umount" not available on this platform
Warning fseccomp: syscall "userfaultfd" not available on this platform
Seccomp list in: @clock,@cpu-emulation,@debug,@module,@obsolete,@raw-io,@reboot,@resources,@swap,acct,add_key,bpf,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,kcmp,keyctl,mount,name_to_handle_at,nfsservctl,ni_syscall,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount,umount2,userfaultfd,vhangup,vmsplice, check list: @default-keep, prelist: adjtimex,clock_adjtime,clock_settime,settimeofday,modify_ldt,lookup_dcookie,perf_event_open,process_vm_writev,delete_module,init_module,_sysctl,afs_syscall,create_module,get_kernel_syms,getpmsg,putpmsg,query_module,security,sysfs,tuxcall,uselib,ustat,vserver,ioperm,iopl,kexec_load,reboot,set_mempolicy,migrate_pages,move_pages,mbind,swapon,swapoff,acct,add_key,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,keyctl,mount,name_to_handle_at,nfsservctl,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount2,vhangup,vmsplice,
Child process initialized in 105.76 ms
Warning: an existing sandbox was detected. /usr/bin/firefox will run without any additional sandboxing features

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus”
Error creating proxy: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus” (g-io-error-quark, 13)
Error creating proxy: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus” (g-io-error-quark, 13)
Error creating proxy: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus” (g-io-error-quark, 13)
Error creating proxy: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus” (g-io-error-quark, 13)

(firefox:9): dconf-WARNING **: failed to commit changes to dconf: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus”

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

Parent is shutting down, bye...

But take notice of this error:
Warning: an existing sandbox was detected. /usr/bin/firefox will run without any additional sandboxing features

What does it mean? Is firefox sandboxed by firejail or not?

I still cannot access local profile file.

I was able to run wine app. It failed to connect to internet. But it has the same warning.

firejail --profile=/etc/firejail/wine.profile --net=none wine start PDFXCview.exe
Reading profile /etc/firejail/wine.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-programs.inc
Parent pid 21174, child pid 21175
Child process initialized in 125.20 ms
Warning: an existing sandbox was detected. /usr/bin/wine will run without any additional sandboxing features
fixme:exec:SHELL_execute flags ignored: 0x00000100
fixme:system:SetProcessDPIAware stub!
fixme:ver:GetCurrentPackageId (0x204e9c8 (nil)): stub
fixme:process:RegisterApplicationRestart (L"/Recover",12)
fixme:msg:ChangeWindowMessageFilter 4a 00000001
fixme:richedit:ME_HandleMessage EM_SETEDITSTYLE: stub
fixme:richedit:ME_HandleMessage EM_SETEDITSTYLE: stub
fixme:mpr:WNetGetUniversalNameW (L"C:\\Program Files\\Tracker Software\\PDF Viewer\\PDFXCview.exe", 0x00000001, 0x337d84, 0x337d80): stub
fixme:resource:GetGuiResources (0xffffffff,1): stub
fixme:ole:RemUnknown_QueryInterface No interface for iid {00000019-0000-0000-c000-000000000046}
fixme:shell:SHGetFileInfoW set icon to shell size, stub
fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix\\media\\data"
err:shell:SHGetFileInfoW pidl is null!
fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix\\media\\data"
err:shell:SHGetFileInfoW pidl is null!
fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix\\media"
err:shell:SHGetFileInfoW pidl is null!
fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix"
err:shell:SHGetFileInfoW pidl is null!
fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix"
err:shell:SHGetFileInfoW pidl is null!
fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix\\lib32\\libcrypt-2.19.so"
err:shell:SHGetFileInfoW pidl is null!

Is it possible to sandbox all wine executable files with --net=none or only a specified application can be run like this. I am not familiar with wine details so I don't know if running PDFXCview.exe in firejail sandbox can prevent for example viruses or any dengerous files from running out of sandbox alongside when wine is active.

<!-- gh-comment-id:394591186 --> @omega3 commented on GitHub (Jun 5, 2018): I deleted firejail from /usr/local/bin and installed again and now it shows correct version 0.9.54. Update: I read release notes and I did: ```sudo firecfg``` Then I added all my users to /etc/firejail/firejail.users So it looks like: ``` user1 user2 ``` On both accounts I am able to run ``` firejail --profile=/etc/firejail/firefox.profile firefox Reading profile /etc/firejail/firefox.profile Reading profile /etc/firejail/firefox-common.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/whitelist-common.inc Reading profile /etc/firejail/whitelist-var-common.inc Parent pid 20121, child pid 20122 Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set. Warning: cleaning all supplementary groups Warning: cleaning all supplementary groups Warning: cleaning all supplementary groups Warning: cleaning all supplementary groups Post-exec seccomp protector enabled Warning fseccomp: syscall "bpf" not available on this platform Warning fseccomp: syscall "kcmp" not available on this platform Warning fseccomp: syscall "ni_syscall" not available on this platform Warning fseccomp: syscall "umount" not available on this platform Warning fseccomp: syscall "userfaultfd" not available on this platform Seccomp list in: @clock,@cpu-emulation,@debug,@module,@obsolete,@raw-io,@reboot,@resources,@swap,acct,add_key,bpf,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,kcmp,keyctl,mount,name_to_handle_at,nfsservctl,ni_syscall,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount,umount2,userfaultfd,vhangup,vmsplice, check list: @default-keep, prelist: adjtimex,clock_adjtime,clock_settime,settimeofday,modify_ldt,lookup_dcookie,perf_event_open,process_vm_writev,delete_module,init_module,_sysctl,afs_syscall,create_module,get_kernel_syms,getpmsg,putpmsg,query_module,security,sysfs,tuxcall,uselib,ustat,vserver,ioperm,iopl,kexec_load,reboot,set_mempolicy,migrate_pages,move_pages,mbind,swapon,swapoff,acct,add_key,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,keyctl,mount,name_to_handle_at,nfsservctl,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount2,vhangup,vmsplice, Child process initialized in 105.76 ms Warning: an existing sandbox was detected. /usr/bin/firefox will run without any additional sandboxing features (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus” Error creating proxy: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus” (g-io-error-quark, 13) Error creating proxy: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus” (g-io-error-quark, 13) Error creating proxy: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus” (g-io-error-quark, 13) Error creating proxy: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus” (g-io-error-quark, 13) (firefox:9): dconf-WARNING **: failed to commit changes to dconf: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus” (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed Parent is shutting down, bye... ``` But take notice of this error: **Warning: an existing sandbox was detected. /usr/bin/firefox will run without any additional sandboxing features** What does it mean? Is firefox sandboxed by firejail or not? **I still cannot access local profile file.** I was able to run wine app. It failed to connect to internet. But it has the same warning. ``` firejail --profile=/etc/firejail/wine.profile --net=none wine start PDFXCview.exe Reading profile /etc/firejail/wine.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-programs.inc Parent pid 21174, child pid 21175 Child process initialized in 125.20 ms Warning: an existing sandbox was detected. /usr/bin/wine will run without any additional sandboxing features fixme:exec:SHELL_execute flags ignored: 0x00000100 fixme:system:SetProcessDPIAware stub! fixme:ver:GetCurrentPackageId (0x204e9c8 (nil)): stub fixme:process:RegisterApplicationRestart (L"/Recover",12) fixme:msg:ChangeWindowMessageFilter 4a 00000001 fixme:richedit:ME_HandleMessage EM_SETEDITSTYLE: stub fixme:richedit:ME_HandleMessage EM_SETEDITSTYLE: stub fixme:mpr:WNetGetUniversalNameW (L"C:\\Program Files\\Tracker Software\\PDF Viewer\\PDFXCview.exe", 0x00000001, 0x337d84, 0x337d80): stub fixme:resource:GetGuiResources (0xffffffff,1): stub fixme:ole:RemUnknown_QueryInterface No interface for iid {00000019-0000-0000-c000-000000000046} fixme:shell:SHGetFileInfoW set icon to shell size, stub fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix\\media\\data" err:shell:SHGetFileInfoW pidl is null! fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix\\media\\data" err:shell:SHGetFileInfoW pidl is null! fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix\\media" err:shell:SHGetFileInfoW pidl is null! fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix" err:shell:SHGetFileInfoW pidl is null! fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix" err:shell:SHGetFileInfoW pidl is null! fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\?\\unix\\lib32\\libcrypt-2.19.so" err:shell:SHGetFileInfoW pidl is null! ``` Is it possible to sandbox all wine executable files with --net=none or only a specified application can be run like this. I am not familiar with wine details so I don't know if running PDFXCview.exe in firejail sandbox can prevent for example viruses or any dengerous files from running out of sandbox alongside when wine is active.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 5, 2018):

Once you run firecfg, don't run it as firejail firefox. Just run it as firefox. That will solve the warning you're seeing. This also means that any options you want for firefox should be put in a profile, since I'm not sure if you can provide extra firejail arguments when running it from the symlink (@netblue30?).

<!-- gh-comment-id:394707745 --> @chiraag-nataraj commented on GitHub (Jun 5, 2018): Once you run `firecfg`, don't run it as `firejail firefox`. Just run it as `firefox`. That will solve the warning you're seeing. This also means that any options you want for `firefox` should be put in a profile, since I'm not sure if you can provide extra firejail arguments when running it from the symlink (@netblue30?).
Author
Owner

@omega3 commented on GitHub (Jun 5, 2018):

But if I don't run begining command from firejail how I will be able to point to local profile?

<!-- gh-comment-id:394710702 --> @omega3 commented on GitHub (Jun 5, 2018): But if I don't run begining command from firejail how I will be able to point to local profile?
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 5, 2018):

It should automatically pick up the local profile. By default, firejail reads profiles from ~/.config/firejail/ if they exist and /etc/firejail if there are no profiles (for that program) in ~/.config/firejail.

<!-- gh-comment-id:394712079 --> @chiraag-nataraj commented on GitHub (Jun 5, 2018): It should automatically pick up the local profile. By default, `firejail` reads profiles from `~/.config/firejail/` if they exist and `/etc/firejail` if there are no profiles (for that program) in `~/.config/firejail`.
Author
Owner

@omega3 commented on GitHub (Jun 5, 2018):

I started firefox in my second user account but I wanted it to read a firejail profile from different location than default

--profile=/media/data/backup/jailkonf/.config/jail.profile

and firefox settings located in /media/data/backup/jail/.mozilla/firefox/

with old version of firejail I was able to use local firejail profiles

firejail --profile=/media/data/backup/jailkonf/.config/jail.profile --seccomp --private=/media/data/backup/jail/ firefox
firefox
Reading profile /etc/firejail/firefox.profile
Reading profile /etc/firejail/firefox-common.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/whitelist-common.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Parent pid 4126, child pid 4127
Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set.
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Post-exec seccomp protector enabled
Warning fseccomp: syscall "bpf" not available on this platform
Warning fseccomp: syscall "kcmp" not available on this platform
Warning fseccomp: syscall "ni_syscall" not available on this platform
Warning fseccomp: syscall "umount" not available on this platform
Warning fseccomp: syscall "userfaultfd" not available on this platform
Seccomp list in: @clock,@cpu-emulation,@debug,@module,@obsolete,@raw-io,@reboot,@resources,@swap,acct,add_key,bpf,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,kcmp,keyctl,mount,name_to_handle_at,nfsservctl,ni_syscall,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount,umount2,userfaultfd,vhangup,vmsplice, check list: @default-keep, prelist: adjtimex,clock_adjtime,clock_settime,settimeofday,modify_ldt,lookup_dcookie,perf_event_open,process_vm_writev,delete_module,init_module,_sysctl,afs_syscall,create_module,get_kernel_syms,getpmsg,putpmsg,query_module,security,sysfs,tuxcall,uselib,ustat,vserver,ioperm,iopl,kexec_load,reboot,set_mempolicy,migrate_pages,move_pages,mbind,swapon,swapoff,acct,add_key,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,keyctl,mount,name_to_handle_at,nfsservctl,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount2,vhangup,vmsplice,
Child process initialized in 131.17 ms

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus”

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

Parent is shutting down, bye...
<!-- gh-comment-id:394714149 --> @omega3 commented on GitHub (Jun 5, 2018): I started firefox in my second user account but I wanted it to read a firejail profile from different location than default --profile=/media/data/backup/jailkonf/.config/jail.profile and firefox settings located in /media/data/backup/jail/.mozilla/firefox/ with old version of firejail I was able to use local firejail profiles ``` firejail --profile=/media/data/backup/jailkonf/.config/jail.profile --seccomp --private=/media/data/backup/jail/ firefox ``` ``` firefox Reading profile /etc/firejail/firefox.profile Reading profile /etc/firejail/firefox-common.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/whitelist-common.inc Reading profile /etc/firejail/whitelist-var-common.inc Parent pid 4126, child pid 4127 Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set. Warning: cleaning all supplementary groups Warning: cleaning all supplementary groups Warning: cleaning all supplementary groups Warning: cleaning all supplementary groups Post-exec seccomp protector enabled Warning fseccomp: syscall "bpf" not available on this platform Warning fseccomp: syscall "kcmp" not available on this platform Warning fseccomp: syscall "ni_syscall" not available on this platform Warning fseccomp: syscall "umount" not available on this platform Warning fseccomp: syscall "userfaultfd" not available on this platform Seccomp list in: @clock,@cpu-emulation,@debug,@module,@obsolete,@raw-io,@reboot,@resources,@swap,acct,add_key,bpf,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,kcmp,keyctl,mount,name_to_handle_at,nfsservctl,ni_syscall,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount,umount2,userfaultfd,vhangup,vmsplice, check list: @default-keep, prelist: adjtimex,clock_adjtime,clock_settime,settimeofday,modify_ldt,lookup_dcookie,perf_event_open,process_vm_writev,delete_module,init_module,_sysctl,afs_syscall,create_module,get_kernel_syms,getpmsg,putpmsg,query_module,security,sysfs,tuxcall,uselib,ustat,vserver,ioperm,iopl,kexec_load,reboot,set_mempolicy,migrate_pages,move_pages,mbind,swapon,swapoff,acct,add_key,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,keyctl,mount,name_to_handle_at,nfsservctl,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount2,vhangup,vmsplice, Child process initialized in 131.17 ms (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (/usr/lib/firefox/firefox:53): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Nieznany lub nieobsługiwany transport „DBUS_SESSION_BUS_ADDRESS=unix” dla adresu „DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus” (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:9): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed Parent is shutting down, bye... ```
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 5, 2018):

You can still do that, but you should remove /usr/local/bin/firefox if you want to do that. Fundamentally, there are a couple of things going on here:

  1. You wanted to sandbox every program you could, so you ran sudo firecfg.
  2. Since there is no per-user option at the moment, every program is sandboxed for every user.
  3. If you use symlinks (as firecfg does), there is no way to provide extra command-line options to firejail.
  4. This means that if you use symlinks (through firecfg), everything has to go in standard locations (~/.config/firejail/ for per-user configuration and /etc/firejail for global configuration).
  5. This means that if you want to pass command-line options to firejail (e.g. non-standard profile locations, dynamically generated stuff, whatever), you cannot use firecfg symlinks (i.e. the links in /usr/local/bin). If you want to do this, you have to remove /usr/local/bin/<program> so that you can explicitly call firejail with the proper options.
<!-- gh-comment-id:394717437 --> @chiraag-nataraj commented on GitHub (Jun 5, 2018): You can still do that, but you should remove `/usr/local/bin/firefox` if you want to do that. Fundamentally, there are a couple of things going on here: 1. You wanted to sandbox every program you could, so you ran `sudo firecfg`. 2. Since there is no per-user option at the moment, every program is sandboxed for every user. 3. If you use symlinks (as `firecfg` does), there is no way to provide extra command-line options to firejail. 4. This means that _if_ you use symlinks (through `firecfg`), everything has to go in standard locations (`~/.config/firejail/` for per-user configuration and `/etc/firejail` for global configuration). 5. This means that if you want to pass command-line options to `firejail` (e.g. non-standard profile locations, dynamically generated stuff, whatever), you _cannot_ use `firecfg` symlinks (i.e. the links in `/usr/local/bin`). If you want to do this, you _have_ to remove `/usr/local/bin/<program>` so that you can explicitly call `firejail` with the proper options.
Author
Owner

@omega3 commented on GitHub (Jun 5, 2018):

I deleted /usr/local/bin/firefox

which firefox shows /usr/bin/firefox
I also deleted firecfg because with firecfg the problem still existed. But this didn't change anything.

I still have:

firejail --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ firefox
Reading profile /media/data/backup/jailkonf/.config/jail.profile
Error: cannot access profile file
<!-- gh-comment-id:394727363 --> @omega3 commented on GitHub (Jun 5, 2018): I deleted `/usr/local/bin/firefox` `which firefox` shows `/usr/bin/firefox` I also deleted firecfg because with firecfg the problem still existed. But this didn't change anything. I still have: ``` firejail --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ firefox Reading profile /media/data/backup/jailkonf/.config/jail.profile Error: cannot access profile file ```
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 5, 2018):

Ah. That would stem from the disable-mnt in the firefox-common profile. You should create a personal profile which includes firefox.profile and adds ignore disable-mnt.

<!-- gh-comment-id:394729235 --> @chiraag-nataraj commented on GitHub (Jun 5, 2018): Ah. That would stem from the `disable-mnt` in the `firefox-common` profile. You should create a personal profile which includes `firefox.profile` and adds `ignore disable-mnt`.
Author
Owner

@omega3 commented on GitHub (Jun 5, 2018):

You should create a personal profile

Do you mean: I should change the content of /etc/firejail/firefox-common.profile or change the content of my local profile? I don't understand

create a personal profile which includes firefox.profile

My local profile looks like this

# Firejail profile for Mozilla Firefox (Iceweasel in Debian)
include /etc/firejail/disable-mgmt.inc
include /etc/firejail/disable-secret.inc
blacklist ${HOME}/
blacklist ${HOME}/.adobe
blacklist ${HOME}/.macromedia
blacklist ${HOME}/user_name
blacklist /media/data/firejail
blacklist /media/data/backup/jailkonf
blacklist /boot
caps
seccomp
ignore disable-mnt
Reading profile /media/data/backup/jailkonf/.config/jail.profile
Error: cannot access profile file

I blacklist /media/data/firejail and /media/data/backup/jailkonf bacause local profile should not allow to change itself by accessing it from web browser.

I blacklisted /HOME because I didn't want a browser to access my personal files at /home.

I also blacklisted some others folders in /media/data/ but I don't list them here as they have no connection to the issue.

Isn't this local profile somehow in conflict with /etc/firejail/firefox-common.profile?

https://firejail.wordpress.com/download-2/release-notes/

All users of Firefox-based browsers who use addons and plugins
that read/write from ${HOME} will need to uncomment the includes for
firefox-common-addons.inc in firefox-common.profile.

Update:
I uncommented the includes for firefox-common-addons.inc in firefox-common.profile with no result.

I noticed that there are a few files in /etc/firejail that have some firefox configurations:

firefox-common-addons.inc
firefox-common.profile
firefox-developer-edition.profile
firefox-esr.profile
firefox-nightly.profile
firefox.profile

Are they used when I run firefox with local firejail config?

Please, tell me waht to do. With local profiles I was able to use two or whatever number of firejail profiles for the same browser. The new version doesn't allow this. Starting firejail with local profile should make fiejail ignore whatever is in /etc/firejail. But even when I deleted all those files /etc/firejail I am not able to access local profile file.

<!-- gh-comment-id:394734577 --> @omega3 commented on GitHub (Jun 5, 2018): > You should create a personal profile Do you mean: I should change the content of /etc/firejail/firefox-common.profile or change the content of my local profile? I don't understand > create a personal profile which includes firefox.profile My local profile looks like this ``` # Firejail profile for Mozilla Firefox (Iceweasel in Debian) include /etc/firejail/disable-mgmt.inc include /etc/firejail/disable-secret.inc blacklist ${HOME}/ blacklist ${HOME}/.adobe blacklist ${HOME}/.macromedia blacklist ${HOME}/user_name blacklist /media/data/firejail blacklist /media/data/backup/jailkonf blacklist /boot caps seccomp ignore disable-mnt ``` ``` Reading profile /media/data/backup/jailkonf/.config/jail.profile Error: cannot access profile file ``` I blacklist ` /media/data/firejail` and `/media/data/backup/jailkonf` bacause local profile should not allow to change itself by accessing it from web browser. I blacklisted /HOME because I didn't want a browser to access my personal files at /home. I also blacklisted some others folders in /media/data/ but I don't list them here as they have no connection to the issue. Isn't this local profile somehow in conflict with `/etc/firejail/firefox-common.profile`? https://firejail.wordpress.com/download-2/release-notes/ > All users of Firefox-based browsers who use addons and plugins > that read/write from ${HOME} will need to uncomment the includes for > firefox-common-addons.inc in firefox-common.profile. Update: I uncommented the includes for `firefox-common-addons.inc` in `firefox-common.profile` with no result. I noticed that there are a few files in /etc/firejail that have some firefox configurations: ``` firefox-common-addons.inc firefox-common.profile firefox-developer-edition.profile firefox-esr.profile firefox-nightly.profile firefox.profile ``` Are they used when I run firefox with local firejail config? Please, tell me waht to do. With local profiles I was able to use two or whatever number of firejail profiles for the same browser. The new version doesn't allow this. Starting firejail with local profile should make fiejail ignore whatever is in /etc/firejail. But even when I deleted all those files /etc/firejail I am not able to access local profile file.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 5, 2018):

Starting firejail with local profile should make fiejail ignore whatever is in /etc/firejail. But even when I deleted all those files /etc/firejail I am not able to access local profile file.

It does. The error you're getting (probably) has nothing to do with the profiles installed by firejail (also, you should probably re-install, since those are useful fall-back profiles!).

Okay, in order for me to give you more help, I need to understand exactly what you're trying to do. You have profiles in /media/backup/data/jailkonf that you want to load. You don't want programs to be able to edit them while inside the jail, so you blacklist that directory in the profile. Is this understanding correct?

Also, I'm confused, since you seem to be loading /media/backup/data/jailconf/.config/jail.profile, but firejail complains it can't find /media/orange/backup/jailkonf/.config/jail.profile. Why the different paths?

<!-- gh-comment-id:394783328 --> @chiraag-nataraj commented on GitHub (Jun 5, 2018): > Starting firejail with local profile should make fiejail ignore whatever is in /etc/firejail. But even when I deleted all those files /etc/firejail I am not able to access local profile file. It does. The error you're getting (probably) has nothing to do with the profiles installed by `firejail` (also, you should probably re-install, since those are useful fall-back profiles!). Okay, in order for me to give you more help, I need to understand exactly what you're trying to do. You have profiles in `/media/backup/data/jailkonf` that you want to load. You don't want programs to be able to edit them while inside the jail, so you blacklist that directory in the profile. Is this understanding correct? Also, I'm confused, since you seem to be loading `/media/backup/data/jailconf/.config/jail.profile`, but `firejail` complains it can't find `/media/orange/backup/jailkonf/.config/jail.profile`. Why the different paths?
Author
Owner

@omega3 commented on GitHub (Jun 5, 2018):

Is this understanding correct?

Yes. This is how it worked with older firejail version. I assumed that it would be stupid if someone could compromise browser and be able to have access to profile files that sandbox browser strightaway and just change them to have full access to /home and other places with private things.

Let's assume the path is
/media/backup/data/jailconf/.config/jail.profile
I made a mistake.

<!-- gh-comment-id:394818873 --> @omega3 commented on GitHub (Jun 5, 2018): > Is this understanding correct? Yes. This is how it worked with older firejail version. I assumed that it would be stupid if someone could compromise browser and be able to have access to profile files that sandbox browser strightaway and just change them to have full access to /home and other places with private things. Let's assume the path is /media/backup/data/jailconf/.config/jail.profile I made a mistake.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 5, 2018):

So if I do firejail --blacklist=/mnt/new_boot/ --profile=/mnt/new_boot/x-terminal-emulator.profile x-terminal-emulator, it works: I get a new terminal emulator with access to /mnt/new_boot denied. (For reference, my x-terminal-emulator.profile didn't contain the blacklist). Adding the blacklist to the profile didn't break either - I was still able to load the profile.

Can you post your firejail profile (the one you're trying to load) here so that I can do some experiments?

<!-- gh-comment-id:394827570 --> @chiraag-nataraj commented on GitHub (Jun 5, 2018): So if I do `firejail --blacklist=/mnt/new_boot/ --profile=/mnt/new_boot/x-terminal-emulator.profile x-terminal-emulator`, it works: I get a new terminal emulator with access to `/mnt/new_boot` denied. (For reference, my `x-terminal-emulator.profile` didn't contain the blacklist). Adding the blacklist to the profile didn't break either - I was still able to load the profile. Can you post your firejail profile (the one you're trying to load) here so that I can do some experiments?
Author
Owner

@omega3 commented on GitHub (Jun 5, 2018):

This is my firejail profile that I used so far successfully with old firejail version:

include /etc/firejail/disable-mgmt.inc
include /etc/firejail/disable-secret.inc
blacklist ${HOME}/
blacklist ${HOME}/.adobe
blacklist ${HOME}/.macromedia
blacklist ${HOME}/user_name
blacklist /media/data/backup/jailkonf
blacklist /boot
caps
seccomp

sorry I made mistake
the profile file is located in
/media/data/backup/jailconf/.config/jail.profile
not as I wrote above
/media/backup/data/jailconf/.config/jail.profile
but this is not acctually important because I start it always the same with correct path.

And blacklist /media/data/firejail that I had listed earlier can be ignored because I keep there another firejail profile, so I blacklisted it too, but for now it is not important.

To sum up: I want to blacklist /home and the path that contains the local profile on /media/data/backup/jailconf/.

/media/data/backup/jailkonf/.config$ ls -l
-rw-rw-r-- 1 user2 user2 1172 cze  5 17:19 jail.profile

Even when I removed from profile blacklist /media/data/backup/jailkonf profile also could not be accessed.

Even when I removed from profile
blacklist ${HOME}/ blacklist ${HOME}/.adobe blacklist ${HOME}/.macromedia blacklist ${HOME}/user_name
profile also could not be accessed. And when I removed the above from profile and moved profile to /home/user2/Documents and pointed to this location when starting firejail I still have the same cannot access profile, this with no firecfg file and with /usr/bin/firefox and with now firefox.profile in /etc/firejail.

Even when I deleted blacklist ${HOME}/ and moved profile to from profile and
I copied firefox.profile from /etc/firejail to /media/data/backup/jailkonf/.config and renamed it to jail.profile so that it matches the command I use and it also could not be accessed.

But firejail --noprofile firefox starts for this user2.

Maybe it has something to do with users permissions for reading / accessing profiles?

I don't know if this is important but in my /home/user2 I have a file .profile with content:

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
	. "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

Perhaps it would be good to test not mine but a sample firejail.profile for this user2.

<!-- gh-comment-id:394849633 --> @omega3 commented on GitHub (Jun 5, 2018): This is my firejail profile that I used so far successfully with old firejail version: ``` include /etc/firejail/disable-mgmt.inc include /etc/firejail/disable-secret.inc blacklist ${HOME}/ blacklist ${HOME}/.adobe blacklist ${HOME}/.macromedia blacklist ${HOME}/user_name blacklist /media/data/backup/jailkonf blacklist /boot caps seccomp ``` sorry I made mistake the profile file is located in /media/data/backup/jailconf/.config/jail.profile not as I wrote above /media/backup/data/jailconf/.config/jail.profile but this is not acctually important because I start it always the same with correct path. And `blacklist /media/data/firejail` that I had listed earlier can be ignored because I keep there another firejail profile, so I blacklisted it too, but for now it is not important. To sum up: I want to blacklist /home and the path that contains the local profile on /media/data/backup/jailconf/. ``` /media/data/backup/jailkonf/.config$ ls -l -rw-rw-r-- 1 user2 user2 1172 cze 5 17:19 jail.profile ``` Even when I removed from profile `blacklist /media/data/backup/jailkonf` profile also could not be accessed. Even when I removed from profile `blacklist ${HOME}/ blacklist ${HOME}/.adobe blacklist ${HOME}/.macromedia blacklist ${HOME}/user_name` profile also could not be accessed. And when I removed the above from profile and moved profile to /home/user2/Documents and pointed to this location when starting firejail I still have the same cannot access profile, this with no firecfg file and with `/usr/bin/firefox` and with now firefox.profile in `/etc/firejail`. Even when I deleted `blacklist ${HOME}/` and moved profile to from profile and I copied `firefox.profile` from `/etc/firejail` to `/media/data/backup/jailkonf/.config` and renamed it to `jail.profile` so that it matches the command I use and it also could not be accessed. But `firejail --noprofile firefox` starts for this user2. Maybe it has something to do with users permissions for reading / accessing profiles? I don't know if this is important but in my /home/user2 I have a file .profile with content: ``` # ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022 # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi ``` Perhaps it would be good to test not mine but a sample firejail.profile for this user2.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 5, 2018):

Can you try commenting out the blacklist /media/data/backup/jailkonf? That is, let's get your existing profile in working condition and then we'll figure out why it's not working. If commenting that out doesn't help, try commenting out other things (it's probably one of the blacklist lines) until the profile launches with no issues.

<!-- gh-comment-id:394894776 --> @chiraag-nataraj commented on GitHub (Jun 5, 2018): Can you try commenting out the `blacklist /media/data/backup/jailkonf`? That is, let's get your existing profile in working condition and then we'll figure out why it's not working. If commenting that out doesn't help, try commenting out other things (it's probably one of the `blacklist` lines) until the profile launches with no issues.
Author
Owner

@omega3 commented on GitHub (Jun 6, 2018):

enabling include /etc/firejail/disable-mgmt.inc gives:

firejail --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ firefox
Reading profile /media/data/backup/jailkonf/.config/jail.profile
Error: cannot access profile file

enabling include /etc/firejail/disable-secret.inc gives:

Reading profile /media/data/backup/jailkonf/.config/jail.profile
Error: cannot access profile file

Actually I don't remember why I put it to my local profile and what is the meaning of them but with older version of firejail they were not a problem.

enabling blacklist ${HOME}/ gives:

Reading profile /media/data/backup/jailkonf/.config/jail.profile
Parent pid 4538, child pid 4539
Error chdir: sandbox.c:947 sandbox: Permission denied
Error: proc 4538 cannot sync with peer: unexpected EOF
Peer 4539 unexpectedly exited with status 1

That's sad because I want to blacklist /home.

Even when only one of the above is active firefox doesn't start giving the above messages.

When I hashed those three above firefox runs ok.

blacklist ${HOME}/.adobe
blacklist ${HOME}/.macromedia
blacklist ${HOME}/user2
blacklist /media/data/backup/jailkonf

has no effect, this meaning it runs ok. So blacklisting path to local firejail config is not a problem, blacklisting my /home/user2, account from which I start firefox isn't a problem, which is great to find out, but blacklisting only /home is a problem. This is something that needs fixing in firejail I think.

All the above tests where done with no firefox.profile in /etc/firejail and with no firecfg - I deleted those files earlier.

After this I reinstalled firejailed, and with firefox.profile in /etc/firejail and after starting firecfg and adding user2 to /etc/firejail/firejail.users the result is the same, I mean firefox starts when the above entries are hashed but I get warning

firejail --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ firefox
Reading profile /media/data/backup/jailkonf/.config/jail.profile
Parent pid 10385, child pid 10386
Child process initialized in 21.12 ms
Warning: an existing sandbox was detected. /usr/bin/firefox will run without any additional sandboxing features

It says about /usr/bin/firefox not about /usr/local/bin/firefox.

Hmm. In the end I would like to take advantage of new firejail features and use at least some of default profiles not for web browsers but for other programs.
Firefox with local profile should ignore firefox.profile in /etc/firejail.

Perhaps it would be good if firejail developer look into it and check if the new version of firejail with firecfg works correctly because firejail should work with blacklist ${HOME}/ option.

This new version of firejail is a nightmare for me. I discovered that I can't open ..bash_history because when firejail is installed dolphin starts with firejail. Now I have to study default profiles to figure out what limits me. I would expect different behavior: user should consciously decide what he/she wants to limit and take action to limit.

<!-- gh-comment-id:394975684 --> @omega3 commented on GitHub (Jun 6, 2018): enabling `include /etc/firejail/disable-mgmt.inc` gives: ``` firejail --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ firefox Reading profile /media/data/backup/jailkonf/.config/jail.profile Error: cannot access profile file ``` enabling `include /etc/firejail/disable-secret.inc` gives: ``` Reading profile /media/data/backup/jailkonf/.config/jail.profile Error: cannot access profile file ``` Actually I don't remember why I put it to my local profile and what is the meaning of them but with older version of firejail they were not a problem. enabling `blacklist ${HOME}/` gives: ``` Reading profile /media/data/backup/jailkonf/.config/jail.profile Parent pid 4538, child pid 4539 Error chdir: sandbox.c:947 sandbox: Permission denied Error: proc 4538 cannot sync with peer: unexpected EOF Peer 4539 unexpectedly exited with status 1 ``` That's sad because I want to blacklist /home. Even when only one of the above is active firefox doesn't start giving the above messages. When I hashed those three above firefox runs ok. ``` blacklist ${HOME}/.adobe blacklist ${HOME}/.macromedia blacklist ${HOME}/user2 blacklist /media/data/backup/jailkonf ``` has no effect, this meaning it runs ok. So blacklisting path to local firejail config is not a problem, blacklisting my /home/user2, account from which I start firefox isn't a problem, which is great to find out, but blacklisting only /home is a problem. This is something that needs fixing in firejail I think. All the above tests where done with no firefox.profile in `/etc/firejail` and with no firecfg - I deleted those files earlier. After this I reinstalled firejailed, and with `firefox.profile` in `/etc/firejail` and after starting firecfg and adding user2 to ` /etc/firejail/firejail.users` the result is the same, I mean firefox starts when the above entries are hashed but I get warning ``` firejail --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ firefox Reading profile /media/data/backup/jailkonf/.config/jail.profile Parent pid 10385, child pid 10386 Child process initialized in 21.12 ms Warning: an existing sandbox was detected. /usr/bin/firefox will run without any additional sandboxing features ``` It says about `/usr/bin/firefox` not about `/usr/local/bin/firefox`. Hmm. In the end I would like to take advantage of new firejail features and use at least some of default profiles not for web browsers but for other programs. Firefox with local profile should ignore firefox.profile in /etc/firejail. Perhaps it would be good if firejail developer look into it and check if the new version of firejail with firecfg works correctly because firejail should work with `blacklist ${HOME}/` option. This new version of firejail is a nightmare for me. I discovered that I can't open ..bash_history because when firejail is installed dolphin starts with firejail. Now I have to study default profiles to figure out what limits me. I would expect different behavior: user should consciously decide what he/she wants to limit and take action to limit.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 6, 2018):

After this I reinstalled firejailed, and with firefox.profile in /etc/firejail and after starting firecfg and adding user2 to /etc/firejail/firejail.users the result is the same, I mean firefox starts when the above entries are hashed but I get warning

As I said earlier, you cannot provide options to firejail if you run it this way. So don't run firecfg if you want to provide these kinds of command-line arguments to firejail. It just won't work. firecfg is useful for those who have a standard setup and can thus put everything they need in the profile files themselves.

As an alternative to use the blacklist=${HOME}/... statements, have you tried using private? This will give you the same effect (the program can't access any of your personal data), but should work in cases when blacklist=${HOME} won't. Also note that ${HOME} refers to /home/user2 and that firejail (by default) blocks access to the home directories of other users (so user1 is banned from looking into /home/user2).

As for the other issues, can you run with firejail --debug or firejail --trace --debug so that we can get a better error message (since I am unable to reproduce on my end) (add --debug or --trace --debug to whatever other messages you have.

Also, please don't use firecfg - run sudo firecfg --clean. firecfg is not for you (and that's okay!). If you can't put your profile files in a standard location (~/.config/firejail), you will just create more headaches by trying to use the links generated by firecfg. It just won't work and you'll beat your head against the wall wondering what's broken and why none of your programs are being sandboxed properly.

For right now, don't delete any files. You can bypass firecfg by using firejail <options> /usr/bin/firefox instead of firejail <options> firefox. Please use this for all further testing.

<!-- gh-comment-id:395036381 --> @chiraag-nataraj commented on GitHub (Jun 6, 2018): > After this I reinstalled firejailed, and with firefox.profile in /etc/firejail and after starting firecfg and adding user2 to /etc/firejail/firejail.users the result is the same, I mean firefox starts when the above entries are hashed but I get warning As I said earlier, you cannot provide options to firejail if you run it this way. So don't run `firecfg` if you want to provide these kinds of command-line arguments to firejail. It just won't work. `firecfg` is useful for those who have a standard setup and can thus put everything they need in the profile files themselves. As an alternative to use the `blacklist=${HOME}/...` statements, have you tried using `private`? This will give you the same effect (the program can't access any of your personal data), but should work in cases when `blacklist=${HOME}` won't. Also note that `${HOME}` refers to `/home/user2` and that `firejail` (by default) blocks access to the home directories of other users (so `user1` is banned from looking into `/home/user2`). As for the other issues, can you run with `firejail --debug` or `firejail --trace --debug` so that we can get a better error message (since I am unable to reproduce on my end) (add `--debug` or `--trace --debug` to whatever other messages you have. Also, _please don't use firecfg_ - run `sudo firecfg --clean`. `firecfg` is not for you (and that's okay!). If you can't put your profile files in a standard location (`~/.config/firejail`), you will just create more headaches by trying to use the links generated by `firecfg`. It just won't work and you'll beat your head against the wall wondering what's broken and why none of your programs are being sandboxed properly. For right now, _don't delete any files_. You can bypass `firecfg` by using `firejail <options> /usr/bin/firefox` instead of `firejail <options> firefox`. Please use this for all further testing.
Author
Owner

@omega3 commented on GitHub (Jun 6, 2018):

Also note that ${HOME} refers to /home/user2 and that firejail (by default) blocks access to the home directories of other users (so user1 is banned from looking into /home/user2).

Does it mean that when I work on user2 account firejail by default will not have access to /home/user1?

have you tried using private

Always. --private=/media/data/backup/jail/

I purged firejail. Installed again. Then I did:
sudo firecfg --clean
Logged in to user2

which firejail
/usr/bin/firejail
firejail --list

No items listed.

which firefox
/usr/bin/firefox

enabling include /etc/firejail/disable-mgmt.inc gives:

firejail --trace --debug --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ /usr/bin/firefox
Reading profile /media/data/backup/jailkonf/.config/jail.profile
Error: cannot access profile file

enabling include /etc/firejail/disable-secret.inc gives:

firejail --trace --debug --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ /usr/bin/firefox
Reading profile /media/data/backup/jailkonf/.config/jail.profile
Error: cannot access profile file

enabling blacklist ${HOME}/ gives:

firejail --trace --debug --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ /usr/bin/firefox
Reading profile /media/data/backup/jailkonf/.config/jail.profile
Autoselecting /bin/bash as shell
Building quoted command line: '/usr/bin/firefox' 
Command name #firefox#
DISPLAY=:0 parsed as 0
Using the local network stack
Parent pid 3631, child pid 3632
Initializing child process
Host network configured
PID namespace installed
Mounting tmpfs on /run/firejail/mnt directory
Creating empty /run/firejail/mnt/seccomp.protocol file
Creating empty /run/firejail/mnt/seccomp.postexec file
IBUS_ADDRESS=unix:abstract=/tmp/dbus-PPk5mMcu,guid=373fd261a38a2aff4a5dcba55b17ca0f
IBUS_DAEMON_PID=1693
Mounting read-only /bin, /sbin, /lib, /lib32, /lib64, /usr, /etc, /var
Mounting tmpfs on /var/lock
Mounting tmpfs on /var/tmp
Mounting tmpfs on /var/log
Mounting tmpfs on /var/lib/dhcp
Mounting tmpfs on /var/lib/snmp
Mounting tmpfs on /var/lib/sudo
Create the new utmp file
Mount the new utmp file
Cleaning /home directory
Sanitizing /etc/passwd, UID_MIN 1000
Sanitizing /etc/group, GID_MIN 1000
Disable /run/firejail/network
Disable /run/firejail/bandwidth
Disable /run/firejail/name
Disable /run/firejail/x11
Drop privileges: pid 2, uid 1001, gid 1001, nogroups 0
Mount-bind /media/data/backup/jail on top of /home/user2
Mounting a new /root directory
Drop privileges: pid 3, uid 1001, gid 1001, nogroups 0
Remounting /proc and /proc/sys filesystems
Remounting /sys directory
Disable /sys/firmware
Disable /sys/hypervisor
Disable /sys/power
Disable /sys/kernel/debug
Disable /sys/kernel/vmcoreinfo
Disable /sys/kernel/uevent_helper
Disable /proc/sys/fs/binfmt_misc
Disable /proc/sys/kernel/core_pattern
Disable /proc/sys/kernel/modprobe
Disable /proc/sysrq-trigger
Disable /proc/sys/kernel/hotplug
Disable /proc/sys/vm/panic_on_oom
Disable /proc/irq
Disable /proc/bus
Disable /proc/sched_debug
Disable /proc/timer_list
Disable /proc/timer_stats
Disable /proc/kcore
Disable /proc/kallsyms
Disable /lib/modules
Disable /usr/lib/debug
Disable /boot
Disable /dev/port
Disable /run/user/1001/gnupg
Disable /run/user/1001/systemd
Disable /dev/kmsg
Disable /proc/kmsg
Disable /home/user2 (requested /home/user2/)
Disable /media/data/backup/jailkonf
Disable /boot
Disable /sys/fs
Disable /sys/module
Drop privileges: pid 4, uid 1001, gid 1001, nogroups 0
Drop privileges: pid 5, uid 1001, gid 1001, nogroups 0
Create the new ld.so.preload file
Mount the new ld.so.preload file
Error chdir: sandbox.c:947 sandbox: Permission denied
Error: proc 3631 cannot sync with peer: unexpected EOF
Peer 3632 unexpectedly exited with status 1

With this one below firefox sarted but Internet didn't worked. I could not connect to google.

firejail --debug --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ /usr/bin/firefox
Reading profile /media/data/backup/jailkonf/.config/jail.profile
Autoselecting /bin/bash as shell
Building quoted command line: '/usr/bin/firefox' 
Command name #firefox#
DISPLAY=:0 parsed as 0
Using the local network stack
Parent pid 5344, child pid 5345
Initializing child process
Host network configured
PID namespace installed
Mounting tmpfs on /run/firejail/mnt directory
Creating empty /run/firejail/mnt/seccomp.protocol file
Creating empty /run/firejail/mnt/seccomp.postexec file
IBUS_ADDRESS=unix:abstract=/tmp/dbus-PPk5mMcu,guid=373fd261a38a2aff4a5dcba55b17ca0f
IBUS_DAEMON_PID=1693
Mounting read-only /bin, /sbin, /lib, /lib32, /lib64, /usr, /etc, /var
Mounting tmpfs on /var/lock
Mounting tmpfs on /var/tmp
Mounting tmpfs on /var/log
Mounting tmpfs on /var/lib/dhcp
Mounting tmpfs on /var/lib/snmp
Mounting tmpfs on /var/lib/sudo
Create the new utmp file
Mount the new utmp file
Cleaning /home directory
Sanitizing /etc/passwd, UID_MIN 1000
Sanitizing /etc/group, GID_MIN 1000
Disable /run/firejail/network
Disable /run/firejail/bandwidth
Disable /run/firejail/name
Disable /run/firejail/x11
Drop privileges: pid 2, uid 1001, gid 1001, nogroups 0
Mount-bind /media/data/backup/jail on top of /home/user2
Mounting a new /root directory
Drop privileges: pid 3, uid 1001, gid 1001, nogroups 0
Remounting /proc and /proc/sys filesystems
Remounting /sys directory
Disable /sys/firmware
Disable /sys/hypervisor
Disable /sys/power
Disable /sys/kernel/debug
Disable /sys/kernel/vmcoreinfo
Disable /sys/kernel/uevent_helper
Disable /proc/sys/fs/binfmt_misc
Disable /proc/sys/kernel/core_pattern
Disable /proc/sys/kernel/modprobe
Disable /proc/sysrq-trigger
Disable /proc/sys/kernel/hotplug
Disable /proc/sys/vm/panic_on_oom
Disable /proc/irq
Disable /proc/bus
Disable /proc/sched_debug
Disable /proc/timer_list
Disable /proc/timer_stats
Disable /proc/kcore
Disable /proc/kallsyms
Disable /lib/modules
Disable /usr/lib/debug
Disable /boot
Disable /dev/port
Disable /run/user/1001/gnupg
Disable /run/user/1001/systemd
Disable /dev/kmsg
Disable /proc/kmsg
Disable /home/user2/.adobe
Disable /media/data/backup/jailkonf
Disable /boot
Disable /sys/fs
Disable /sys/module
262 236 0:49 /pulse /home/user2/.config/pulse rw,nosuid,nodev,noexec - tmpfs tmpfs rw,mode=755
fsname=/pulse dir=/home/user2/.config/pulse fstype=tmpfs
Current directory: /home/user2
DISPLAY=:0 parsed as 0
Drop CAP_SYS_MODULE
Drop CAP_SYS_RAWIO
Drop CAP_SYS_BOOT
Drop CAP_SYS_NICE
Drop CAP_SYS_TTY_CONFIG
Drop CAP_SYSLOG
Drop CAP_MKNOD
Drop CAP_SYS_ADMIN
configuring 54 seccomp entries in /run/firejail/mnt/seccomp.32
sbox run: /usr/lib/firejail/fsec-print /run/firejail/mnt/seccomp.32 (null) 
Dropping all capabilities
Drop privileges: pid 4, uid 1001, gid 1001, nogroups 1
No supplementary groups
 line  OP JT JF    K
=================================
 0000: 20 00 00 00000004   ld  data.architecture
 0001: 15 01 00 40000003   jeq ARCH_32 0003 (false 0002)
 0002: 06 00 00 7fff0000   ret ALLOW
 0003: 20 00 00 00000000   ld  data.syscall-number
 0004: 15 30 00 00000015   jeq 15 0035 (false 0005)
 0005: 15 2f 00 00000034   jeq 34 0035 (false 0006)
 0006: 15 2e 00 0000001a   jeq 1a 0035 (false 0007)
 0007: 15 2d 00 0000011b   jeq 11b 0035 (false 0008)
 0008: 15 2c 00 00000155   jeq 155 0035 (false 0009)
 0009: 15 2b 00 00000156   jeq 156 0035 (false 000a)
 000a: 15 2a 00 0000007f   jeq 7f 0035 (false 000b)
 000b: 15 29 00 00000080   jeq 80 0035 (false 000c)
 000c: 15 28 00 0000015e   jeq 15e 0035 (false 000d)
 000d: 15 27 00 00000081   jeq 81 0035 (false 000e)
 000e: 15 26 00 0000006e   jeq 6e 0035 (false 000f)
 000f: 15 25 00 00000065   jeq 65 0035 (false 0010)
 0010: 15 24 00 00000121   jeq 121 0035 (false 0011)
 0011: 15 23 00 00000057   jeq 57 0035 (false 0012)
 0012: 15 22 00 00000073   jeq 73 0035 (false 0013)
 0013: 15 21 00 00000067   jeq 67 0035 (false 0014)
 0014: 15 20 00 0000015b   jeq 15b 0035 (false 0015)
 0015: 15 1f 00 0000015c   jeq 15c 0035 (false 0016)
 0016: 15 1e 00 00000087   jeq 87 0035 (false 0017)
 0017: 15 1d 00 00000095   jeq 95 0035 (false 0018)
 0018: 15 1c 00 0000007c   jeq 7c 0035 (false 0019)
 0019: 15 1b 00 00000157   jeq 157 0035 (false 001a)
 001a: 15 1a 00 000000fd   jeq fd 0035 (false 001b)
 001b: 15 19 00 00000150   jeq 150 0035 (false 001c)
 001c: 15 18 00 00000152   jeq 152 0035 (false 001d)
 001d: 15 17 00 0000015d   jeq 15d 0035 (false 001e)
 001e: 15 16 00 0000011e   jeq 11e 0035 (false 001f)
 001f: 15 15 00 0000011f   jeq 11f 0035 (false 0020)
 0020: 15 14 00 00000120   jeq 120 0035 (false 0021)
 0021: 15 13 00 00000056   jeq 56 0035 (false 0022)
 0022: 15 12 00 00000033   jeq 33 0035 (false 0023)
 0023: 15 11 00 0000007b   jeq 7b 0035 (false 0024)
 0024: 15 10 00 000000d9   jeq d9 0035 (false 0025)
 0025: 15 0f 00 000000f5   jeq f5 0035 (false 0026)
 0026: 15 0e 00 000000f6   jeq f6 0035 (false 0027)
 0027: 15 0d 00 000000f7   jeq f7 0035 (false 0028)
 0028: 15 0c 00 000000f8   jeq f8 0035 (false 0029)
 0029: 15 0b 00 000000f9   jeq f9 0035 (false 002a)
 002a: 15 0a 00 00000101   jeq 101 0035 (false 002b)
 002b: 15 09 00 00000112   jeq 112 0035 (false 002c)
 002c: 15 08 00 00000114   jeq 114 0035 (false 002d)
 002d: 15 07 00 00000126   jeq 126 0035 (false 002e)
 002e: 15 06 00 0000013d   jeq 13d 0035 (false 002f)
 002f: 15 05 00 0000013c   jeq 13c 0035 (false 0030)
 0030: 15 04 00 0000003d   jeq 3d 0035 (false 0031)
 0031: 15 03 00 00000058   jeq 58 0035 (false 0032)
 0032: 15 02 00 000000a9   jeq a9 0035 (false 0033)
 0033: 15 01 00 00000082   jeq 82 0035 (false 0034)
 0034: 06 00 00 7fff0000   ret ALLOW
 0035: 06 00 00 00000000   ret KILL
Dual 32/64 bit seccomp filter configured
configuring 69 seccomp entries in /run/firejail/mnt/seccomp
sbox run: /usr/lib/firejail/fsec-print /run/firejail/mnt/seccomp (null) 
Dropping all capabilities
Drop privileges: pid 5, uid 1001, gid 1001, nogroups 1
No supplementary groups
 line  OP JT JF    K
=================================
 0000: 20 00 00 00000004   ld  data.architecture
 0001: 15 01 00 c000003e   jeq ARCH_64 0003 (false 0002)
 0002: 06 00 00 7fff0000   ret ALLOW
 0003: 20 00 00 00000000   ld  data.syscall-number
 0004: 35 01 00 40000000   jge X32_ABI 0006 (false 0005)
 0005: 35 01 00 00000000   jge read 0007 (false 0006)
 0006: 06 00 00 00050001   ret ERRNO(1)
 0007: 15 3c 00 0000009a   jeq modify_ldt 0044 (false 0008)
 0008: 15 3b 00 000000d4   jeq lookup_dcookie 0044 (false 0009)
 0009: 15 3a 00 0000012a   jeq perf_event_open 0044 (false 000a)
 000a: 15 39 00 00000137   jeq process_vm_writev 0044 (false 000b)
 000b: 15 38 00 0000009c   jeq _sysctl 0044 (false 000c)
 000c: 15 37 00 000000b7   jeq afs_syscall 0044 (false 000d)
 000d: 15 36 00 000000ae   jeq create_module 0044 (false 000e)
 000e: 15 35 00 000000b1   jeq get_kernel_syms 0044 (false 000f)
 000f: 15 34 00 000000b5   jeq getpmsg 0044 (false 0010)
 0010: 15 33 00 000000b6   jeq putpmsg 0044 (false 0011)
 0011: 15 32 00 000000b2   jeq query_module 0044 (false 0012)
 0012: 15 31 00 000000b9   jeq security 0044 (false 0013)
 0013: 15 30 00 0000008b   jeq sysfs 0044 (false 0014)
 0014: 15 2f 00 000000b8   jeq tuxcall 0044 (false 0015)
 0015: 15 2e 00 00000086   jeq uselib 0044 (false 0016)
 0016: 15 2d 00 00000088   jeq ustat 0044 (false 0017)
 0017: 15 2c 00 000000ec   jeq vserver 0044 (false 0018)
 0018: 15 2b 00 0000009f   jeq adjtimex 0044 (false 0019)
 0019: 15 2a 00 00000131   jeq clock_adjtime 0044 (false 001a)
 001a: 15 29 00 000000e3   jeq clock_settime 0044 (false 001b)
 001b: 15 28 00 000000a4   jeq settimeofday 0044 (false 001c)
 001c: 15 27 00 000000b0   jeq delete_module 0044 (false 001d)
 001d: 15 26 00 000000af   jeq init_module 0044 (false 001e)
 001e: 15 25 00 000000ad   jeq ioperm 0044 (false 001f)
 001f: 15 24 00 000000ac   jeq iopl 0044 (false 0020)
 0020: 15 23 00 000000f6   jeq kexec_load 0044 (false 0021)
 0021: 15 22 00 000000a9   jeq reboot 0044 (false 0022)
 0022: 15 21 00 000000a7   jeq swapon 0044 (false 0023)
 0023: 15 20 00 000000a8   jeq swapoff 0044 (false 0024)
 0024: 15 1f 00 000000a3   jeq acct 0044 (false 0025)
 0025: 15 1e 00 000000a1   jeq chroot 0044 (false 0026)
 0026: 15 1d 00 000000a5   jeq mount 0044 (false 0027)
 0027: 15 1c 00 000000b4   jeq nfsservctl 0044 (false 0028)
 0028: 15 1b 00 0000009b   jeq pivot_root 0044 (false 0029)
 0029: 15 1a 00 000000ab   jeq setdomainname 0044 (false 002a)
 002a: 15 19 00 000000aa   jeq sethostname 0044 (false 002b)
 002b: 15 18 00 000000a6   jeq umount2 0044 (false 002c)
 002c: 15 17 00 00000099   jeq vhangup 0044 (false 002d)
 002d: 15 16 00 000000ee   jeq set_mempolicy 0044 (false 002e)
 002e: 15 15 00 00000100   jeq migrate_pages 0044 (false 002f)
 002f: 15 14 00 00000117   jeq move_pages 0044 (false 0030)
 0030: 15 13 00 000000ed   jeq mbind 0044 (false 0031)
 0031: 15 12 00 00000130   jeq open_by_handle_at 0044 (false 0032)
 0032: 15 11 00 0000012f   jeq name_to_handle_at 0044 (false 0033)
 0033: 15 10 00 000000fb   jeq ioprio_set 0044 (false 0034)
 0034: 15 0f 00 00000067   jeq syslog 0044 (false 0035)
 0035: 15 0e 00 0000012c   jeq fanotify_init 0044 (false 0036)
 0036: 15 0d 00 000000f8   jeq add_key 0044 (false 0037)
 0037: 15 0c 00 000000f9   jeq request_key 0044 (false 0038)
 0038: 15 0b 00 000000fa   jeq keyctl 0044 (false 0039)
 0039: 15 0a 00 000000ce   jeq io_setup 0044 (false 003a)
 003a: 15 09 00 000000cf   jeq io_destroy 0044 (false 003b)
 003b: 15 08 00 000000d0   jeq io_getevents 0044 (false 003c)
 003c: 15 07 00 000000d1   jeq io_submit 0044 (false 003d)
 003d: 15 06 00 000000d2   jeq io_cancel 0044 (false 003e)
 003e: 15 05 00 000000d8   jeq remap_file_pages 0044 (false 003f)
 003f: 15 04 00 00000116   jeq vmsplice 0044 (false 0040)
 0040: 15 03 00 00000087   jeq personality 0044 (false 0041)
 0041: 15 02 00 00000065   jeq ptrace 0044 (false 0042)
 0042: 15 01 00 00000136   jeq process_vm_readv 0044 (false 0043)
 0043: 06 00 00 7fff0000   ret ALLOW
 0044: 06 00 00 00000000   ret KILL
seccomp filter configured
Drop privileges: pid 1, uid 1001, gid 1001, nogroups 0
starting application
LD_PRELOAD=(null)
Running '/usr/bin/firefox'  command through /bin/bash
execvp argument 0: /bin/bash
execvp argument 1: -c
execvp argument 2: '/usr/bin/firefox' 
Child process initialized in 8.00 ms
Installing /run/firejail/mnt/seccomp seccomp filter
Installing /run/firejail/mnt/seccomp.32 seccomp filter
monitoring pid 6


(firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
ExceptionHandler::GenerateDump cloned child 117
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
ExceptionHandler::GenerateDump cloned child 120
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...

This is interesting:
Mount-bind /media/data/backup/jail on top of /home/user2

I also exported to output to txt but not entire output was exported. I don't know how to export it properly.
firejail --trace --debug --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ /usr/bin/firefox > 01.txt

output of that file
https://pastebin.com/z3FqW4Nb

<!-- gh-comment-id:395062352 --> @omega3 commented on GitHub (Jun 6, 2018): > Also note that ${HOME} refers to /home/user2 and that firejail (by default) blocks access to the home directories of other users (so user1 is banned from looking into /home/user2). Does it mean that when I work on user2 account firejail by default will not have access to /home/user1? > have you tried using private Always. `--private=/media/data/backup/jail/` I purged firejail. Installed again. Then I did: `sudo firecfg --clean` Logged in to user2 ``` which firejail /usr/bin/firejail firejail --list ``` No items listed. ``` which firefox /usr/bin/firefox ``` enabling `include /etc/firejail/disable-mgmt.inc` gives: ``` firejail --trace --debug --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ /usr/bin/firefox Reading profile /media/data/backup/jailkonf/.config/jail.profile Error: cannot access profile file ``` enabling `include /etc/firejail/disable-secret.inc` gives: ``` firejail --trace --debug --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ /usr/bin/firefox Reading profile /media/data/backup/jailkonf/.config/jail.profile Error: cannot access profile file ``` enabling `blacklist ${HOME}/` gives: ``` firejail --trace --debug --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ /usr/bin/firefox Reading profile /media/data/backup/jailkonf/.config/jail.profile Autoselecting /bin/bash as shell Building quoted command line: '/usr/bin/firefox' Command name #firefox# DISPLAY=:0 parsed as 0 Using the local network stack Parent pid 3631, child pid 3632 Initializing child process Host network configured PID namespace installed Mounting tmpfs on /run/firejail/mnt directory Creating empty /run/firejail/mnt/seccomp.protocol file Creating empty /run/firejail/mnt/seccomp.postexec file IBUS_ADDRESS=unix:abstract=/tmp/dbus-PPk5mMcu,guid=373fd261a38a2aff4a5dcba55b17ca0f IBUS_DAEMON_PID=1693 Mounting read-only /bin, /sbin, /lib, /lib32, /lib64, /usr, /etc, /var Mounting tmpfs on /var/lock Mounting tmpfs on /var/tmp Mounting tmpfs on /var/log Mounting tmpfs on /var/lib/dhcp Mounting tmpfs on /var/lib/snmp Mounting tmpfs on /var/lib/sudo Create the new utmp file Mount the new utmp file Cleaning /home directory Sanitizing /etc/passwd, UID_MIN 1000 Sanitizing /etc/group, GID_MIN 1000 Disable /run/firejail/network Disable /run/firejail/bandwidth Disable /run/firejail/name Disable /run/firejail/x11 Drop privileges: pid 2, uid 1001, gid 1001, nogroups 0 Mount-bind /media/data/backup/jail on top of /home/user2 Mounting a new /root directory Drop privileges: pid 3, uid 1001, gid 1001, nogroups 0 Remounting /proc and /proc/sys filesystems Remounting /sys directory Disable /sys/firmware Disable /sys/hypervisor Disable /sys/power Disable /sys/kernel/debug Disable /sys/kernel/vmcoreinfo Disable /sys/kernel/uevent_helper Disable /proc/sys/fs/binfmt_misc Disable /proc/sys/kernel/core_pattern Disable /proc/sys/kernel/modprobe Disable /proc/sysrq-trigger Disable /proc/sys/kernel/hotplug Disable /proc/sys/vm/panic_on_oom Disable /proc/irq Disable /proc/bus Disable /proc/sched_debug Disable /proc/timer_list Disable /proc/timer_stats Disable /proc/kcore Disable /proc/kallsyms Disable /lib/modules Disable /usr/lib/debug Disable /boot Disable /dev/port Disable /run/user/1001/gnupg Disable /run/user/1001/systemd Disable /dev/kmsg Disable /proc/kmsg Disable /home/user2 (requested /home/user2/) Disable /media/data/backup/jailkonf Disable /boot Disable /sys/fs Disable /sys/module Drop privileges: pid 4, uid 1001, gid 1001, nogroups 0 Drop privileges: pid 5, uid 1001, gid 1001, nogroups 0 Create the new ld.so.preload file Mount the new ld.so.preload file Error chdir: sandbox.c:947 sandbox: Permission denied Error: proc 3631 cannot sync with peer: unexpected EOF Peer 3632 unexpectedly exited with status 1 ``` With this one below firefox sarted but Internet didn't worked. I could not connect to google. ``` firejail --debug --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ /usr/bin/firefox Reading profile /media/data/backup/jailkonf/.config/jail.profile Autoselecting /bin/bash as shell Building quoted command line: '/usr/bin/firefox' Command name #firefox# DISPLAY=:0 parsed as 0 Using the local network stack Parent pid 5344, child pid 5345 Initializing child process Host network configured PID namespace installed Mounting tmpfs on /run/firejail/mnt directory Creating empty /run/firejail/mnt/seccomp.protocol file Creating empty /run/firejail/mnt/seccomp.postexec file IBUS_ADDRESS=unix:abstract=/tmp/dbus-PPk5mMcu,guid=373fd261a38a2aff4a5dcba55b17ca0f IBUS_DAEMON_PID=1693 Mounting read-only /bin, /sbin, /lib, /lib32, /lib64, /usr, /etc, /var Mounting tmpfs on /var/lock Mounting tmpfs on /var/tmp Mounting tmpfs on /var/log Mounting tmpfs on /var/lib/dhcp Mounting tmpfs on /var/lib/snmp Mounting tmpfs on /var/lib/sudo Create the new utmp file Mount the new utmp file Cleaning /home directory Sanitizing /etc/passwd, UID_MIN 1000 Sanitizing /etc/group, GID_MIN 1000 Disable /run/firejail/network Disable /run/firejail/bandwidth Disable /run/firejail/name Disable /run/firejail/x11 Drop privileges: pid 2, uid 1001, gid 1001, nogroups 0 Mount-bind /media/data/backup/jail on top of /home/user2 Mounting a new /root directory Drop privileges: pid 3, uid 1001, gid 1001, nogroups 0 Remounting /proc and /proc/sys filesystems Remounting /sys directory Disable /sys/firmware Disable /sys/hypervisor Disable /sys/power Disable /sys/kernel/debug Disable /sys/kernel/vmcoreinfo Disable /sys/kernel/uevent_helper Disable /proc/sys/fs/binfmt_misc Disable /proc/sys/kernel/core_pattern Disable /proc/sys/kernel/modprobe Disable /proc/sysrq-trigger Disable /proc/sys/kernel/hotplug Disable /proc/sys/vm/panic_on_oom Disable /proc/irq Disable /proc/bus Disable /proc/sched_debug Disable /proc/timer_list Disable /proc/timer_stats Disable /proc/kcore Disable /proc/kallsyms Disable /lib/modules Disable /usr/lib/debug Disable /boot Disable /dev/port Disable /run/user/1001/gnupg Disable /run/user/1001/systemd Disable /dev/kmsg Disable /proc/kmsg Disable /home/user2/.adobe Disable /media/data/backup/jailkonf Disable /boot Disable /sys/fs Disable /sys/module 262 236 0:49 /pulse /home/user2/.config/pulse rw,nosuid,nodev,noexec - tmpfs tmpfs rw,mode=755 fsname=/pulse dir=/home/user2/.config/pulse fstype=tmpfs Current directory: /home/user2 DISPLAY=:0 parsed as 0 Drop CAP_SYS_MODULE Drop CAP_SYS_RAWIO Drop CAP_SYS_BOOT Drop CAP_SYS_NICE Drop CAP_SYS_TTY_CONFIG Drop CAP_SYSLOG Drop CAP_MKNOD Drop CAP_SYS_ADMIN configuring 54 seccomp entries in /run/firejail/mnt/seccomp.32 sbox run: /usr/lib/firejail/fsec-print /run/firejail/mnt/seccomp.32 (null) Dropping all capabilities Drop privileges: pid 4, uid 1001, gid 1001, nogroups 1 No supplementary groups line OP JT JF K ================================= 0000: 20 00 00 00000004 ld data.architecture 0001: 15 01 00 40000003 jeq ARCH_32 0003 (false 0002) 0002: 06 00 00 7fff0000 ret ALLOW 0003: 20 00 00 00000000 ld data.syscall-number 0004: 15 30 00 00000015 jeq 15 0035 (false 0005) 0005: 15 2f 00 00000034 jeq 34 0035 (false 0006) 0006: 15 2e 00 0000001a jeq 1a 0035 (false 0007) 0007: 15 2d 00 0000011b jeq 11b 0035 (false 0008) 0008: 15 2c 00 00000155 jeq 155 0035 (false 0009) 0009: 15 2b 00 00000156 jeq 156 0035 (false 000a) 000a: 15 2a 00 0000007f jeq 7f 0035 (false 000b) 000b: 15 29 00 00000080 jeq 80 0035 (false 000c) 000c: 15 28 00 0000015e jeq 15e 0035 (false 000d) 000d: 15 27 00 00000081 jeq 81 0035 (false 000e) 000e: 15 26 00 0000006e jeq 6e 0035 (false 000f) 000f: 15 25 00 00000065 jeq 65 0035 (false 0010) 0010: 15 24 00 00000121 jeq 121 0035 (false 0011) 0011: 15 23 00 00000057 jeq 57 0035 (false 0012) 0012: 15 22 00 00000073 jeq 73 0035 (false 0013) 0013: 15 21 00 00000067 jeq 67 0035 (false 0014) 0014: 15 20 00 0000015b jeq 15b 0035 (false 0015) 0015: 15 1f 00 0000015c jeq 15c 0035 (false 0016) 0016: 15 1e 00 00000087 jeq 87 0035 (false 0017) 0017: 15 1d 00 00000095 jeq 95 0035 (false 0018) 0018: 15 1c 00 0000007c jeq 7c 0035 (false 0019) 0019: 15 1b 00 00000157 jeq 157 0035 (false 001a) 001a: 15 1a 00 000000fd jeq fd 0035 (false 001b) 001b: 15 19 00 00000150 jeq 150 0035 (false 001c) 001c: 15 18 00 00000152 jeq 152 0035 (false 001d) 001d: 15 17 00 0000015d jeq 15d 0035 (false 001e) 001e: 15 16 00 0000011e jeq 11e 0035 (false 001f) 001f: 15 15 00 0000011f jeq 11f 0035 (false 0020) 0020: 15 14 00 00000120 jeq 120 0035 (false 0021) 0021: 15 13 00 00000056 jeq 56 0035 (false 0022) 0022: 15 12 00 00000033 jeq 33 0035 (false 0023) 0023: 15 11 00 0000007b jeq 7b 0035 (false 0024) 0024: 15 10 00 000000d9 jeq d9 0035 (false 0025) 0025: 15 0f 00 000000f5 jeq f5 0035 (false 0026) 0026: 15 0e 00 000000f6 jeq f6 0035 (false 0027) 0027: 15 0d 00 000000f7 jeq f7 0035 (false 0028) 0028: 15 0c 00 000000f8 jeq f8 0035 (false 0029) 0029: 15 0b 00 000000f9 jeq f9 0035 (false 002a) 002a: 15 0a 00 00000101 jeq 101 0035 (false 002b) 002b: 15 09 00 00000112 jeq 112 0035 (false 002c) 002c: 15 08 00 00000114 jeq 114 0035 (false 002d) 002d: 15 07 00 00000126 jeq 126 0035 (false 002e) 002e: 15 06 00 0000013d jeq 13d 0035 (false 002f) 002f: 15 05 00 0000013c jeq 13c 0035 (false 0030) 0030: 15 04 00 0000003d jeq 3d 0035 (false 0031) 0031: 15 03 00 00000058 jeq 58 0035 (false 0032) 0032: 15 02 00 000000a9 jeq a9 0035 (false 0033) 0033: 15 01 00 00000082 jeq 82 0035 (false 0034) 0034: 06 00 00 7fff0000 ret ALLOW 0035: 06 00 00 00000000 ret KILL Dual 32/64 bit seccomp filter configured configuring 69 seccomp entries in /run/firejail/mnt/seccomp sbox run: /usr/lib/firejail/fsec-print /run/firejail/mnt/seccomp (null) Dropping all capabilities Drop privileges: pid 5, uid 1001, gid 1001, nogroups 1 No supplementary groups line OP JT JF K ================================= 0000: 20 00 00 00000004 ld data.architecture 0001: 15 01 00 c000003e jeq ARCH_64 0003 (false 0002) 0002: 06 00 00 7fff0000 ret ALLOW 0003: 20 00 00 00000000 ld data.syscall-number 0004: 35 01 00 40000000 jge X32_ABI 0006 (false 0005) 0005: 35 01 00 00000000 jge read 0007 (false 0006) 0006: 06 00 00 00050001 ret ERRNO(1) 0007: 15 3c 00 0000009a jeq modify_ldt 0044 (false 0008) 0008: 15 3b 00 000000d4 jeq lookup_dcookie 0044 (false 0009) 0009: 15 3a 00 0000012a jeq perf_event_open 0044 (false 000a) 000a: 15 39 00 00000137 jeq process_vm_writev 0044 (false 000b) 000b: 15 38 00 0000009c jeq _sysctl 0044 (false 000c) 000c: 15 37 00 000000b7 jeq afs_syscall 0044 (false 000d) 000d: 15 36 00 000000ae jeq create_module 0044 (false 000e) 000e: 15 35 00 000000b1 jeq get_kernel_syms 0044 (false 000f) 000f: 15 34 00 000000b5 jeq getpmsg 0044 (false 0010) 0010: 15 33 00 000000b6 jeq putpmsg 0044 (false 0011) 0011: 15 32 00 000000b2 jeq query_module 0044 (false 0012) 0012: 15 31 00 000000b9 jeq security 0044 (false 0013) 0013: 15 30 00 0000008b jeq sysfs 0044 (false 0014) 0014: 15 2f 00 000000b8 jeq tuxcall 0044 (false 0015) 0015: 15 2e 00 00000086 jeq uselib 0044 (false 0016) 0016: 15 2d 00 00000088 jeq ustat 0044 (false 0017) 0017: 15 2c 00 000000ec jeq vserver 0044 (false 0018) 0018: 15 2b 00 0000009f jeq adjtimex 0044 (false 0019) 0019: 15 2a 00 00000131 jeq clock_adjtime 0044 (false 001a) 001a: 15 29 00 000000e3 jeq clock_settime 0044 (false 001b) 001b: 15 28 00 000000a4 jeq settimeofday 0044 (false 001c) 001c: 15 27 00 000000b0 jeq delete_module 0044 (false 001d) 001d: 15 26 00 000000af jeq init_module 0044 (false 001e) 001e: 15 25 00 000000ad jeq ioperm 0044 (false 001f) 001f: 15 24 00 000000ac jeq iopl 0044 (false 0020) 0020: 15 23 00 000000f6 jeq kexec_load 0044 (false 0021) 0021: 15 22 00 000000a9 jeq reboot 0044 (false 0022) 0022: 15 21 00 000000a7 jeq swapon 0044 (false 0023) 0023: 15 20 00 000000a8 jeq swapoff 0044 (false 0024) 0024: 15 1f 00 000000a3 jeq acct 0044 (false 0025) 0025: 15 1e 00 000000a1 jeq chroot 0044 (false 0026) 0026: 15 1d 00 000000a5 jeq mount 0044 (false 0027) 0027: 15 1c 00 000000b4 jeq nfsservctl 0044 (false 0028) 0028: 15 1b 00 0000009b jeq pivot_root 0044 (false 0029) 0029: 15 1a 00 000000ab jeq setdomainname 0044 (false 002a) 002a: 15 19 00 000000aa jeq sethostname 0044 (false 002b) 002b: 15 18 00 000000a6 jeq umount2 0044 (false 002c) 002c: 15 17 00 00000099 jeq vhangup 0044 (false 002d) 002d: 15 16 00 000000ee jeq set_mempolicy 0044 (false 002e) 002e: 15 15 00 00000100 jeq migrate_pages 0044 (false 002f) 002f: 15 14 00 00000117 jeq move_pages 0044 (false 0030) 0030: 15 13 00 000000ed jeq mbind 0044 (false 0031) 0031: 15 12 00 00000130 jeq open_by_handle_at 0044 (false 0032) 0032: 15 11 00 0000012f jeq name_to_handle_at 0044 (false 0033) 0033: 15 10 00 000000fb jeq ioprio_set 0044 (false 0034) 0034: 15 0f 00 00000067 jeq syslog 0044 (false 0035) 0035: 15 0e 00 0000012c jeq fanotify_init 0044 (false 0036) 0036: 15 0d 00 000000f8 jeq add_key 0044 (false 0037) 0037: 15 0c 00 000000f9 jeq request_key 0044 (false 0038) 0038: 15 0b 00 000000fa jeq keyctl 0044 (false 0039) 0039: 15 0a 00 000000ce jeq io_setup 0044 (false 003a) 003a: 15 09 00 000000cf jeq io_destroy 0044 (false 003b) 003b: 15 08 00 000000d0 jeq io_getevents 0044 (false 003c) 003c: 15 07 00 000000d1 jeq io_submit 0044 (false 003d) 003d: 15 06 00 000000d2 jeq io_cancel 0044 (false 003e) 003e: 15 05 00 000000d8 jeq remap_file_pages 0044 (false 003f) 003f: 15 04 00 00000116 jeq vmsplice 0044 (false 0040) 0040: 15 03 00 00000087 jeq personality 0044 (false 0041) 0041: 15 02 00 00000065 jeq ptrace 0044 (false 0042) 0042: 15 01 00 00000136 jeq process_vm_readv 0044 (false 0043) 0043: 06 00 00 7fff0000 ret ALLOW 0044: 06 00 00 00000000 ret KILL seccomp filter configured Drop privileges: pid 1, uid 1001, gid 1001, nogroups 0 starting application LD_PRELOAD=(null) Running '/usr/bin/firefox' command through /bin/bash execvp argument 0: /bin/bash execvp argument 1: -c execvp argument 2: '/usr/bin/firefox' Child process initialized in 8.00 ms Installing /run/firejail/mnt/seccomp seccomp filter Installing /run/firejail/mnt/seccomp.32 seccomp filter monitoring pid 6 (firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:6): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed ExceptionHandler::GenerateDump cloned child 117 ExceptionHandler::SendContinueSignalToChild sent continue signal to child ExceptionHandler::WaitForContinueSignal waiting for continue signal... ExceptionHandler::GenerateDump cloned child 120 ExceptionHandler::SendContinueSignalToChild sent continue signal to child ExceptionHandler::WaitForContinueSignal waiting for continue signal... ``` This is interesting: `Mount-bind /media/data/backup/jail on top of /home/user2` I also exported to output to txt but not entire output was exported. I don't know how to export it properly. `firejail --trace --debug --profile=/media/data/backup/jailkonf/.config/jail.profile --private=/media/data/backup/jail/ /usr/bin/firefox > 01.txt` output of that file https://pastebin.com/z3FqW4Nb
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 6, 2018):

Does it mean that when I work on user2 account firejail by default will not have access to /home/user1?

Yes.

I feel like using both --private= (which mounts that directory over ${HOME}) and blacklist ${HOME} is counterproductive. Try not enabling blacklist ${HOME} - if you're mounting something else over it, you don't need to blacklist it (since only the contents of the directory passed to --private will be available)! I should have probably caught this earlier... 😜

<!-- gh-comment-id:395064905 --> @chiraag-nataraj commented on GitHub (Jun 6, 2018): > Does it mean that when I work on user2 account firejail by default will not have access to /home/user1? Yes. I feel like using both `--private=` (which mounts that directory __over__ `${HOME}`) and `blacklist ${HOME}` is counterproductive. Try not enabling `blacklist ${HOME}` - if you're mounting something else over it, you don't need to blacklist it (since __only__ the contents of the directory passed to `--private` will be available)! I should have probably caught this earlier... :stuck_out_tongue_winking_eye:
Author
Owner

@omega3 commented on GitHub (Jun 6, 2018):

I don't understand.

Try not enabling blacklist ${HOME} - if you're mounting something else over it, you don't need to blacklist it

Try not enabling blacklist ${HOME} = it will be hashed or I can remove the whole entry from profile.

you don't need to blacklist it = it means it can stay

It seems like two opposites.

When I removed blacklist ${HOME} completely from profile firefox starts but with can't connect to internet.
Than I changed profile and moved profile to /home/user2/Downloads

blacklist ${HOME}/.adobe
blacklist ${HOME}/.macromedia
blacklist ${HOME}/user2
blacklist /boot
caps
seccomp

the output of
firejail --trace --debug --profile=/home/user2/Downloads/jail.profile /usr/bin/firefox > 03.txt
I removed --private so that it can create default firefox profile/settings.
https://pastebin.com/266ppXJn

No internet connection, failed to show google.

Than I removed blacklist ${HOME}/user2 and the same result. It looks like it can't handle local --profile.

It would be great if a developer of firejail could check with two user accounts how this new firejail version handles local --profile for user2.

firejail --trace --debug /usr/bin/firefox
on user2 account starts firefox and connetcs to google.

<!-- gh-comment-id:395084570 --> @omega3 commented on GitHub (Jun 6, 2018): I don't understand. `Try not enabling blacklist ${HOME} - if you're mounting something else over it, you don't need to blacklist it ` Try not enabling `blacklist ${HOME}` = it will be hashed or I can remove the whole entry from profile. you don't need to blacklist it = it means it can stay It seems like two opposites. When I removed `blacklist ${HOME}` completely from profile firefox starts but with can't connect to internet. Than I changed profile and moved profile to `/home/user2/Downloads` ``` blacklist ${HOME}/.adobe blacklist ${HOME}/.macromedia blacklist ${HOME}/user2 blacklist /boot caps seccomp ``` the output of `firejail --trace --debug --profile=/home/user2/Downloads/jail.profile /usr/bin/firefox > 03.txt` I removed --private so that it can create default firefox profile/settings. https://pastebin.com/266ppXJn No internet connection, failed to show google. Than I removed `blacklist ${HOME}/user2` and the same result. It looks like it can't handle local --profile. It would be great if a developer of firejail could check with two user accounts how this new firejail version handles local --profile for user2. `firejail --trace --debug /usr/bin/firefox` on user2 account starts firefox and connetcs to google.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 6, 2018):

Try not enabling blacklist ${HOME} = it will be hashed or I can remove the whole entry from profile.
you don't need to blacklist it = it means it can stay
It seems like two opposites.

You misunderstood. What I mean is that --private means that no files in the original home directory (/home/user2 or whatever) will be visible or accessible.

<!-- gh-comment-id:395104270 --> @chiraag-nataraj commented on GitHub (Jun 6, 2018): > Try not enabling blacklist ${HOME} = it will be hashed or I can remove the whole entry from profile. you don't need to blacklist it = it means it can stay It seems like two opposites. You misunderstood. What I mean is that `--private` means that no files in the original home directory (`/home/user2` or whatever) will be visible or accessible.
Author
Owner

@omega3 commented on GitHub (Jun 6, 2018):

--private means that no files in the original home directory (/home/user2 or whatever) will be visible or accessible.

I see. I can keep firefox settings in home, no problem. But how can I make local --profile work? Because now firefox starts but don't connect to internet.

I think it is a bug that when I use
firejail --trace --debug --profile=/home/user2/Downloads/jail.profile /usr/bin/firefox
I have no connection to internet.

Only firejail /usr/bin/firefox works for me. But it uses /etc/firejail/firefox.profile
https://pastebin.com/tAnzqJtE

I can edit and use default firefox.profile but it will change with new firejail install. Doing this for many programs would not the best solution.

I tested all possibilities. I think someone need to test usage of local --profile for user2.

<!-- gh-comment-id:395112784 --> @omega3 commented on GitHub (Jun 6, 2018): > `--private` means that no files in the original home directory (/home/user2 or whatever) will be visible or accessible. I see. I can keep firefox settings in home, no problem. But how can I make local `--profile` work? Because now firefox starts but don't connect to internet. I think it is a bug that when I use `firejail --trace --debug --profile=/home/user2/Downloads/jail.profile /usr/bin/firefox` I have no connection to internet. Only `firejail /usr/bin/firefox` works for me. But it uses `/etc/firejail/firefox.profile` https://pastebin.com/tAnzqJtE I can edit and use default `firefox.profile` but it will change with new firejail install. Doing this for many programs would not the best solution. I tested all possibilities. I think someone need to test usage of local `--profile` for user2.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 6, 2018):

Don't use blacklist and only use --private. (you can also put it in the profile).

<!-- gh-comment-id:395202659 --> @chiraag-nataraj commented on GitHub (Jun 6, 2018): Don't use `blacklist` and _only_ use `--private`. (you can also put it in the profile).
Author
Owner

@omega3 commented on GitHub (Jun 7, 2018):

With this local profile (no blacklist) I have no internet connection.

caps
seccomp

firejail --trace --debug --profile=/home/user2/Downloads/jail.profile /usr/bin/firefox

With this local profile seccomp removed:

blacklist /media/data/backup/others
blacklist /media/data/backup/jail/Documents
blacklist /media/data/backup/jail/Desktop
blacklist /boot
caps

I have Internet connection.

I also tried

blacklist ${HOME}/.adobe
blacklist ${HOME}/.macromedia
blacklist ${HOME}/user2
blacklist /media/data/backup/others
blacklist /media/data/backup/jail/Documents
blacklist /media/data/backup/jail/Desktop
blacklist /boot
caps

And I have Internet connection.

If you want me to attach --trace --debug from those two above tests, please tell me what is the proper way to sent the output to a file so that the whole output will be written to file. Because before the process seen in terminal was so long that it wasn't written in full to a file.

<!-- gh-comment-id:395378796 --> @omega3 commented on GitHub (Jun 7, 2018): With this local profile (no blacklist) I have no internet connection. ``` caps seccomp ``` `firejail --trace --debug --profile=/home/user2/Downloads/jail.profile /usr/bin/firefox ` With this local profile **seccomp** removed: ``` blacklist /media/data/backup/others blacklist /media/data/backup/jail/Documents blacklist /media/data/backup/jail/Desktop blacklist /boot caps ``` I have Internet connection. I also tried ``` blacklist ${HOME}/.adobe blacklist ${HOME}/.macromedia blacklist ${HOME}/user2 blacklist /media/data/backup/others blacklist /media/data/backup/jail/Documents blacklist /media/data/backup/jail/Desktop blacklist /boot caps ``` And I have Internet connection. If you want me to attach `--trace --debug` from those two above tests, please tell me what is the proper way to sent the output to a file so that the whole output will be written to file. Because before the process seen in terminal was so long that it wasn't written in full to a file.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 7, 2018):

With this local profile seccomp removed:

If you are using Firefox 60, this is a known issue (see #1939, #1847). So yes, seccomp is the issue here.

In other words, if this works with disabling seccomp, this specific issue is solved.

To solve the seccomp issue:
From what I understand, since this should be fixed in the current dev edition of firejail, you could just go ahead and compile from source (instead of installing the deb package). If you want help with that, open a new issue and I'll help you there. Or, you could just not put seccomp in your own profile and call it a day.

<!-- gh-comment-id:395385970 --> @chiraag-nataraj commented on GitHub (Jun 7, 2018): > With this local profile seccomp removed: If you are using Firefox 60, this is a known issue (see #1939, #1847). So yes, `seccomp` is the issue here. In other words, if this works with disabling `seccomp`, this specific issue is solved. To solve the `seccomp` issue: From what I understand, since this _should_ be fixed in the current dev edition of firejail, you could just go ahead and compile from source (instead of installing the deb package). If you want help with that, open a new issue and I'll help you there. Or, you could just not put seccomp in your own profile and call it a day.
Author
Owner

@omega3 commented on GitHub (Jun 7, 2018):

Yes, I am sorry that I have not checked this earlier.

By the way, can you tell me what you think about this:
Is it possible to sandbox all wine executable files with --net=none or only a specified application can be run like this? I am not familiar with wine details so I don't know if running PDFXCview.exe in firejail sandbox can prevent for example viruses or any dengerous files from running out of sandbox alongside when wine is active. Is there any "main".exe for wine so that we can cut of internet access to wine with --net=none, because if someone have a virus it will not be included in blacklist.

<!-- gh-comment-id:395388806 --> @omega3 commented on GitHub (Jun 7, 2018): Yes, I am sorry that I have not checked this earlier. By the way, can you tell me what you think about this: Is it possible to sandbox all wine executable files with --net=none or only a specified application can be run like this? I am not familiar with wine details so I don't know if running PDFXCview.exe in firejail sandbox can prevent for example viruses or any dengerous files from running out of sandbox alongside when wine is active. Is there any "main".exe for wine so that we can cut of internet access to wine with `--net=none`, because if someone have a virus it will not be included in blacklist.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 7, 2018):

Yes, I am sorry that I have not checked this earlier.

No worries!

Is it possible to sandbox all wine executable files with --net=none or only a specified application can be run like this?

From what I remember of wine you run a program as wine <program>, right? I would create a local wine profile with net none (as well as includeing the upstream wine profile). Then, if a particular application breaks, just run it as firejail --ignore=net wine <program>. This way, you're protected by default but can selectively allow internet access for Windows applications that need it.

<!-- gh-comment-id:395396801 --> @chiraag-nataraj commented on GitHub (Jun 7, 2018): > Yes, I am sorry that I have not checked this earlier. No worries! > Is it possible to sandbox all wine executable files with --net=none or only a specified application can be run like this? From what I remember of `wine` you run a program as `wine <program>`, right? I would create a local `wine` profile with `net none` (as well as `include`ing the upstream `wine` profile). Then, if a particular application breaks, just run it as `firejail --ignore=net wine <program>`. This way, you're protected by default but can selectively allow internet access for Windows applications that need it.
Author
Owner

@omega3 commented on GitHub (Jun 7, 2018):

Ok. Thank you for explanation and for your patience.

I installed firejail version 0.9.55 and with seccomp in profile there is still no internet connection.

firejail --version
firejail version 0.9.55
which firejail
/usr/local/bin/firejail

Should I first remove old version before compiling and installing a new one?

<!-- gh-comment-id:395400864 --> @omega3 commented on GitHub (Jun 7, 2018): Ok. Thank you for explanation and for your patience. I installed firejail version 0.9.55 and with seccomp in profile there is still no internet connection. ``` firejail --version firejail version 0.9.55 which firejail /usr/local/bin/firejail ``` Should I first remove old version before compiling and installing a new one?
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 7, 2018):

I installed firejail version 0.9.55 and with seccomp in profile there is still no internet connection.

Right, because seccomp itself hasn't changed. The change I was talking about was in the default profiles (afaik). As I said, you'd get the same effect by not including seccomp in your profile.

Also note that the compiled version installs profiles to /usr/local/etc/firejail, so the includes in your /media/<blah> profile are using the old profiles, not the ones that come with the development version of firejail (which are in /usr/local/etc/firejail).

<!-- gh-comment-id:395405845 --> @chiraag-nataraj commented on GitHub (Jun 7, 2018): > I installed firejail version 0.9.55 and with seccomp in profile there is still no internet connection. Right, because `seccomp` itself hasn't changed. The change I was talking about was in the default profiles (afaik). As I said, you'd get the same effect by not including `seccomp` in your profile. Also note that the compiled version installs profiles to `/usr/local/etc/firejail`, so the includes in your `/media/<blah>` profile are using the old profiles, not the ones that come with the development version of firejail (which are in `/usr/local/etc/firejail`).
Author
Owner

@omega3 commented on GitHub (Jun 7, 2018):

So, I can benefit from this seccomp fix in new development version if I decide to use default profile in /usr/local/etc/firejail?

If I think correctly this will not change with next stable deb release. I will not be able to use seccomp option in local --profile. I will be able to use seccomp option only with default profile from /usr/etc/firejail, correct?

Why the bug fix is not "system wide" and doesn't allow including seccomp in local profiles.

To me it looks like the new versions limit options available for local / custom profiles.

<!-- gh-comment-id:395449375 --> @omega3 commented on GitHub (Jun 7, 2018): So, I can benefit from this `seccomp` fix in new development version if I decide to use default profile in `/usr/local/etc/firejail`? If I think correctly this will not change with next stable deb release. I will not be able to use `seccomp` option in local `--profile`. I will be able to use `seccomp` option only with default profile from `/usr/etc/firejail`, correct? Why the bug fix is not "system wide" and doesn't allow including `seccomp` in local profiles. To me it looks like the new versions limit options available for local / custom profiles.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 7, 2018):

Let me try to spell it out, since communication seems to keep getting mixed up 😂

  1. The newer versions of Firefox seem to play badly with an external seccomp filter (Firefox has its own built-in seccomp filter now, similar to Chrom[e/ium], and firejail's seccomp filter interferes with Firefox's ability to set up its own filter).
  2. seccomp works just fine on the firejail end. But due to the problem with firefox, I believe seccomp was removed (by default) from the firefox profile only (not any other profiles - again, the problem isn't with firejail - it's a problem with the interaction between firejail and firefox).
  3. The "seccomp fix" as you describe it is simply to remove the seccomp option from the (default) firefox profile shipped with firejail. That's all. Nothing else going on here.
  4. Again, this is not a problem with firejail. Nothing's restricting you from using seccomp in firejail profiles, whether in firefox.profile or some other profile.

I hope this clears things up. Communication over the internet is hard 😀

<!-- gh-comment-id:395453336 --> @chiraag-nataraj commented on GitHub (Jun 7, 2018): Let me try to spell it out, since communication seems to keep getting mixed up :joy: 1. The newer versions of Firefox seem to play badly with an external `seccomp` filter (Firefox has its own built-in `seccomp` filter now, similar to Chrom[e/ium], and firejail's `seccomp` filter interferes with Firefox's ability to set up its own filter). 2. `seccomp` works just fine on the `firejail` end. But due to the problem with `firefox`, I believe `seccomp` was removed (by default) from the `firefox` profile _only_ (not any other profiles - again, the problem isn't with _firejail_ - it's a problem with the interaction between firejail and firefox). 3. The "seccomp fix" as you describe it is simply to remove the seccomp option from the (default) firefox profile shipped with firejail. That's all. Nothing else going on here. 4. Again, this is _not_ a problem with firejail. Nothing's restricting you from using seccomp in firejail profiles, whether in firefox.profile or some other profile. I hope this clears things up. Communication over the internet is hard :grinning:
Author
Owner

@omega3 commented on GitHub (Jun 7, 2018):

Again, this is not a problem with firejail. Nothing's restricting you from using seccomp in firejail profiles, whether in firefox.profile or some other profile

With local profile:

caps
seccomp

opera doesn't start correctly. Process ends with this line monitoring pid 4 and hangs. Opera window doesn't appear.

https://pastebin.com/LwVXkE0W

When I remove seccomp from this profile opera runs ok.

<!-- gh-comment-id:395469058 --> @omega3 commented on GitHub (Jun 7, 2018): > Again, this is not a problem with firejail. Nothing's restricting you from using seccomp in firejail profiles, whether in firefox.profile or some other profile With local profile: ``` caps seccomp ``` opera doesn't start correctly. Process ends with this line `monitoring pid 4` and hangs. Opera window doesn't appear. https://pastebin.com/LwVXkE0W When I remove `seccomp` from this profile opera runs ok.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 7, 2018):

Yes, I believe opera uses the Chromium sandbox and thus will not work with seccomp enabled. Again, the seccomp feature is not broken. It so happens that these programs implement their own sandboxes, which they cannot do if firejail sandboxes them first. Instead of continuing, say, after a warning, they decide to just fail badly. That is not a problem with firejail.

Regardless, the original problem in this thread seems to have been solved and I'm going to close it. If you have more questions about the way firejail works, please open a new issue. Thanks!

<!-- gh-comment-id:395518790 --> @chiraag-nataraj commented on GitHub (Jun 7, 2018): Yes, I believe `opera` uses the Chromium sandbox and thus will not work with `seccomp` enabled. Again, the _seccomp_ feature is not broken. It so happens that these programs implement _their own_ sandboxes, which they cannot do if firejail sandboxes them first. Instead of continuing, say, after a warning, they decide to just fail badly. That is not a problem with firejail. Regardless, the original problem in this thread seems to have been solved and I'm going to close it. If you have more questions about the way firejail works, please open a new issue. Thanks!
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#1329
No description provided.