SELinux is not configured when running install script #2346

Open
opened 2025-11-20 07:08:20 -05:00 by saavagebueno · 2 comments
Owner

Originally created by @a7g4 on GitHub (Oct 6, 2025).

Describe the problem

I installed netbird using curl -fsSL https://pkgs.netbird.io/install.sh | sh but SELinux blocks execution

To Reproduce

Steps to reproduce the behavior:

  1. Install fresh OpenSUSE Tumbleweed
  2. Run curl -fsSL https://pkgs.netbird.io/install.sh | sh
  3. Run netbird service install
  4. Run netbird service start
  5. Run journalctl -u netbird

See error:

Oct 06 11:39:48 systemd[1]: netbird.service: Scheduled restart job immediately on client request, restart counter is at 72.
Oct 06 11:39:48 systemd[1]: Started NetBird mesh network client.
Oct 06 11:39:48 (netbird)[271857]: netbird.service: Unable to locate executable '/usr/bin/netbird': Permission denied
Oct 06 11:39:48 (netbird)[271857]: netbird.service: Failed at step EXEC spawning /usr/bin/netbird: Permission denied
Oct 06 11:39:48 systemd[1]: netbird.service: Main process exited, code=exited, status=203/EXEC
Oct 06 11:39:48 systemd[1]: netbird.service: Failed with result 'exit-code'.

Using SE Linux troubleshooter:

Image

Expected behavior

Netbird service should start

Are you using NetBird Cloud?

Issue appears both using Netbird Cloud and self-hosted.

NetBird version

> netbird version
0.59.2

Is any other VPN software installed?

No

Debug output

> netbird status -dA
2025-10-06T11:46:31-06:00 INFO ./caller_not_available:0: 2025/10/06 11:46:31 WARNING: [core] [Channel #1 SubChannel #2]grpc: addrConn.createTransport failed to connect to {Addr: "/var/run/netbird.sock", ServerName: "localhost", Attributes: {"<%!p(networktype.keyType=grpc.internal.transport.networktype)>": "unix" }, BalancerAttributes: {"<%!p(pickfirstleaf.managedByPickfirstKeyType={})>": "<%!p(bool=true)>" }}. Err: connection error: desc = "transport: Error while dialing: dial unix /var/run/netbird.sock: connect: no such file or directory"
2025-10-06T11:46:32-06:00 INFO ./caller_not_available:0: 2025/10/06 11:46:32 WARNING: [core] [Channel #1 SubChannel #2]grpc: addrConn.createTransport failed to connect to {Addr: "/var/run/netbird.sock", ServerName: "localhost", Attributes: {"<%!p(networktype.keyType=grpc.internal.transport.networktype)>": "unix" }, BalancerAttributes: {"<%!p(pickfirstleaf.managedByPickfirstKeyType={})>": "<%!p(bool=true)>" }}. Err: connection error: desc = "transport: Error while dialing: dial unix /var/run/netbird.sock: connect: no such file or directory"
2025-10-06T11:46:34-06:00 INFO ./caller_not_available:0: 2025/10/06 11:46:34 WARNING: [core] [Channel #1 SubChannel #2]grpc: addrConn.createTransport failed to connect to {Addr: "/var/run/netbird.sock", ServerName: "localhost", Attributes: {"<%!p(networktype.keyType=grpc.internal.transport.networktype)>": "unix" }, BalancerAttributes: {"<%!p(pickfirstleaf.managedByPickfirstKeyType={})>": "<%!p(bool=true)>" }}. Err: connection error: desc = "transport: Error while dialing: dial unix /var/run/netbird.sock: connect: no such file or directory"
2025-10-06T11:46:36-06:00 INFO ./caller_not_available:0: 2025/10/06 11:46:36 WARNING: [core] [Channel #1 SubChannel #2]grpc: addrConn.createTransport failed to connect to {Addr: "/var/run/netbird.sock", ServerName: "localhost", Attributes: {"<%!p(networktype.keyType=grpc.internal.transport.networktype)>": "unix" }, BalancerAttributes: {"<%!p(pickfirstleaf.managedByPickfirstKeyType={})>": "<%!p(bool=true)>" }}. Err: connection error: desc = "transport: Error while dialing: dial unix /var/run/netbird.sock: connect: no such file or directory"
2025-10-06T11:46:40-06:00 INFO ./caller_not_available:0: 2025/10/06 11:46:40 WARNING: [core] [Channel #1 SubChannel #2]grpc: addrConn.createTransport failed to connect to {Addr: "/var/run/netbird.sock", ServerName: "localhost", Attributes: {"<%!p(networktype.keyType=grpc.internal.transport.networktype)>": "unix" }, BalancerAttributes: {"<%!p(pickfirstleaf.managedByPickfirstKeyType={})>": "<%!p(bool=true)>" }}. Err: connection error: desc = "transport: Error while dialing: dial unix /var/run/netbird.sock: connect: no such file or directory"
Error: failed to connect to daemon error: context deadline exceeded
If the daemon is not running please run: 
netbird service install 
netbird service start

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • [?] Checked firewall settings
Originally created by @a7g4 on GitHub (Oct 6, 2025). **Describe the problem** I installed netbird using `curl -fsSL https://pkgs.netbird.io/install.sh | sh` but SELinux blocks execution **To Reproduce** Steps to reproduce the behavior: 1. Install fresh OpenSUSE Tumbleweed 2. Run `curl -fsSL https://pkgs.netbird.io/install.sh | sh` 3. Run `netbird service install` 4. Run `netbird service start` 5. Run `journalctl -u netbird` See error: ``` Oct 06 11:39:48 systemd[1]: netbird.service: Scheduled restart job immediately on client request, restart counter is at 72. Oct 06 11:39:48 systemd[1]: Started NetBird mesh network client. Oct 06 11:39:48 (netbird)[271857]: netbird.service: Unable to locate executable '/usr/bin/netbird': Permission denied Oct 06 11:39:48 (netbird)[271857]: netbird.service: Failed at step EXEC spawning /usr/bin/netbird: Permission denied Oct 06 11:39:48 systemd[1]: netbird.service: Main process exited, code=exited, status=203/EXEC Oct 06 11:39:48 systemd[1]: netbird.service: Failed with result 'exit-code'. ``` Using SE Linux troubleshooter: <img width="1351" height="774" alt="Image" src="https://github.com/user-attachments/assets/8d56b353-98f3-45dc-8d85-097439be286b" /> **Expected behavior** Netbird service should start **Are you using NetBird Cloud?** Issue appears both using Netbird Cloud and self-hosted. **NetBird version** ``` > netbird version 0.59.2 ``` **Is any other VPN software installed?** No **Debug output** ``` > netbird status -dA 2025-10-06T11:46:31-06:00 INFO ./caller_not_available:0: 2025/10/06 11:46:31 WARNING: [core] [Channel #1 SubChannel #2]grpc: addrConn.createTransport failed to connect to {Addr: "/var/run/netbird.sock", ServerName: "localhost", Attributes: {"<%!p(networktype.keyType=grpc.internal.transport.networktype)>": "unix" }, BalancerAttributes: {"<%!p(pickfirstleaf.managedByPickfirstKeyType={})>": "<%!p(bool=true)>" }}. Err: connection error: desc = "transport: Error while dialing: dial unix /var/run/netbird.sock: connect: no such file or directory" 2025-10-06T11:46:32-06:00 INFO ./caller_not_available:0: 2025/10/06 11:46:32 WARNING: [core] [Channel #1 SubChannel #2]grpc: addrConn.createTransport failed to connect to {Addr: "/var/run/netbird.sock", ServerName: "localhost", Attributes: {"<%!p(networktype.keyType=grpc.internal.transport.networktype)>": "unix" }, BalancerAttributes: {"<%!p(pickfirstleaf.managedByPickfirstKeyType={})>": "<%!p(bool=true)>" }}. Err: connection error: desc = "transport: Error while dialing: dial unix /var/run/netbird.sock: connect: no such file or directory" 2025-10-06T11:46:34-06:00 INFO ./caller_not_available:0: 2025/10/06 11:46:34 WARNING: [core] [Channel #1 SubChannel #2]grpc: addrConn.createTransport failed to connect to {Addr: "/var/run/netbird.sock", ServerName: "localhost", Attributes: {"<%!p(networktype.keyType=grpc.internal.transport.networktype)>": "unix" }, BalancerAttributes: {"<%!p(pickfirstleaf.managedByPickfirstKeyType={})>": "<%!p(bool=true)>" }}. Err: connection error: desc = "transport: Error while dialing: dial unix /var/run/netbird.sock: connect: no such file or directory" 2025-10-06T11:46:36-06:00 INFO ./caller_not_available:0: 2025/10/06 11:46:36 WARNING: [core] [Channel #1 SubChannel #2]grpc: addrConn.createTransport failed to connect to {Addr: "/var/run/netbird.sock", ServerName: "localhost", Attributes: {"<%!p(networktype.keyType=grpc.internal.transport.networktype)>": "unix" }, BalancerAttributes: {"<%!p(pickfirstleaf.managedByPickfirstKeyType={})>": "<%!p(bool=true)>" }}. Err: connection error: desc = "transport: Error while dialing: dial unix /var/run/netbird.sock: connect: no such file or directory" 2025-10-06T11:46:40-06:00 INFO ./caller_not_available:0: 2025/10/06 11:46:40 WARNING: [core] [Channel #1 SubChannel #2]grpc: addrConn.createTransport failed to connect to {Addr: "/var/run/netbird.sock", ServerName: "localhost", Attributes: {"<%!p(networktype.keyType=grpc.internal.transport.networktype)>": "unix" }, BalancerAttributes: {"<%!p(pickfirstleaf.managedByPickfirstKeyType={})>": "<%!p(bool=true)>" }}. Err: connection error: desc = "transport: Error while dialing: dial unix /var/run/netbird.sock: connect: no such file or directory" Error: failed to connect to daemon error: context deadline exceeded If the daemon is not running please run: netbird service install netbird service start ``` **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here. **Have you tried these troubleshooting steps?** - [X] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [X] Checked for newer NetBird versions - [X] Searched for similar issues on GitHub (including closed ones) - [X] Restarted the NetBird client - [X] Disabled other VPN software - [?] Checked firewall settings
saavagebueno added the feature-requestclientsystem-compatibility-issue labels 2025-11-20 07:08:20 -05:00
Author
Owner

@nazarewk commented on GitHub (Oct 6, 2025):

I might be wrong, but I heard opinions SELinux/AppArmor usually needs to be custom-tailored to the specific use case and barely any application ship those policies out of the box.

Analyzing what's wrong and providing a working configuration snippet here would go a long way.

@nazarewk commented on GitHub (Oct 6, 2025): I might be wrong, but I heard opinions SELinux/AppArmor usually needs to be custom-tailored to the specific use case and barely any application ship those policies out of the box. Analyzing what's wrong and providing a working configuration snippet here would go a long way.
Author
Owner

@a7g4 commented on GitHub (Oct 6, 2025):

FWIW, it looks like OpenSUSE switched to SELinux for new installs recently; it was using AppArmor earlier and that worked.

It looks like running this was all I needed to get the service to start:

sudo restorecon -v /usr/bin/netbird

I know nothing about SE Linux other than stumbling through this so:

  1. Don't blindly copy what I did
  2. I am not sure if it's OpenSUSE running an overly restrictive config or if all SELinux setups will have the same issue.
@a7g4 commented on GitHub (Oct 6, 2025): FWIW, it looks like OpenSUSE switched to SELinux for new installs recently; it was using AppArmor earlier and that worked. It looks like running this was all I needed to get the service to start: ``` sudo restorecon -v /usr/bin/netbird ``` I know nothing about SE Linux other than stumbling through this so: 1. Don't blindly copy what I did 2. I am not sure if it's OpenSUSE running an overly restrictive config or if all SELinux setups will have the same issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2346