mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5480] vscodium: cannot use sudo nor ssh #3012
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#3012
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @g4njawizard on GitHub (Nov 23, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5480
Hi,
I am still a noob in terms of firejail configuration.
I have Apparmor and Firejail enabled and I can use it with firefox or thunderbird, but when I try to use codium, I have some problems.
When I run codium and use the default profile, codium is way too restricted.
I can't sudo, nor access .ssh or different directories that are important for my test's or pushing for github etc.
So I've build a custom profile with whitelistings.
Unfortunately I cannot start codium with my custom profile.
my profile:
When I try to run codium
ll /usr/bin/codium
lrwxrwxrwx 1 root root 28 Nov 11 05:17 /usr/bin/codium -> /usr/share/codium/bin/codium
Is there something like a learning mode for profile building? So I can run codium and firejail tracks everything the application uses?
firejail version 0.9.70
@smitsohu commented on GitHub (Nov 25, 2022):
Your profile has a commented line
#include disable-common.inc, but when you run Firejail it reportsReading profile /etc/firejail/disable-common.inc. So we have a mismatch here. Can you please verify the pasted profile is correct?It might be easier to adapt the codium profile shipped by Firejail to your needs, rather than build a new profile from scratch (even though that's admittedly more fun). To enable
ssh, you probably will need to addinclude allow-ssh.inc. Maybe it helps to take a look at the other rules inssh.profile?Allowing
sudoinside a sandbox is quite painful; it is possible to get this running, but you will need to water down the sandbox very significantly. If you are ok with this, add to the profile:@smitsohu commented on GitHub (Nov 25, 2022):
--build,--traceand --tracelogoptions do this. But it doesn't work with all applications.@g4njawizard commented on GitHub (Feb 8, 2023):
Still have the same error despite the fact that it is reading the "allow-ssh.inc"
The profiles that has been loaded:
@ghost commented on GitHub (Feb 8, 2023):
This warning might be important to double-check. It usually means that you're using
firecfg, which creates symlinks under /usr/local/bin/foo to the firejail binary, usually located at /usr/bin/firejail. Or you've created similar symlinks yourself. Either way, if you have a/usr/local/bin/ssh, try to move it out of the way for testing (temporarily rename it) and post the output from the below command here please:@g4njawizard commented on GitHub (Feb 9, 2023):
codium now has lost it's connection to the internet, but I haven't changed the config.
When I move the ssh file and run codium, I see the following:
Inside Codium:
@kmk3 commented on GitHub (Feb 9, 2023):
@g4njawizard on Feb 9:
The issue appears to be that allow-ssh.inc is being included after (rather than
before)
disable-.inc files. See also profile.template.Unless you intend to override an entire profile, it's recommended to put the
changes in a .local file instead of overriding .profile files.
This also makes it easier to see what exactly was changed.
Try this: Remove all modifications from related .profile files in /etc/firejail
and add the following to ~/.config/firejail/code.local:
@g4njawizard commented on GitHub (Feb 9, 2023):
Thanks for that! SSH works now. Do you know what setting I need to enable network connection for plugins?
@kmk3 commented on GitHub (Feb 9, 2023):
@g4njawizard on Feb 9:
No problem.
Did you change the
networkoption in /etc/firejail/firejail.config?@g4njawizard commented on GitHub (Feb 9, 2023):
I dont remember if I've set it, or it is default:
firejail.config:
Do I have to create a namespace and allow for specific programms in that namespace network access?
@kmk3 commented on GitHub (Feb 9, 2023):
@g4njawizard on Feb 9:
See the description:
I don't think so, unless you are doing something firewall-related.
@g4njawizard commented on GitHub (Feb 9, 2023):
You're right. I've done it in the past with the idea of allowing single applications to access the network. But I never configured something in that way and forgot about it.
Thanks for the support!