[GH-ISSUE #3616] Can't use newsboat through torsocks #2272

Closed
opened 2026-05-05 08:57:58 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @Unser395 on GitHub (Aug 30, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3616

Write clear, concise and in textual form.

Bug and expected behavior

  • Since I use Firejail by default for all program, I can't launch newsboat through torsocks anymore. It worked fine when I was not using Firejail
  • What did you expect to happen? To use newsboat through torsocks. Which parameter in the profile is activating newsboat as setuid ?

No profile or disabling firejail

  • What changed calling firejail --noprofile PROGRAM in a shell? Not sure on how to do this with the torsocks command. I use firejail by default for all program and don't usually type the firejail command in a terminal.

Reproduce
Steps to reproduce the behavior:

  1. Enable firejail by default with apparmor
  2. Run in bash torsocks newsboat
  3. See error ERROR: newsboat is setuid. torsocks will not work on a setuid executable.

Environment

  • Linux distribution and version : Manjaro Linux 20.1
  • Firejail version (output of firejail --version) exclusive or used git commit (git rev-parse HEAD) : firejail version 0.9.62.4
  • What other programs interact with the affected program for the functionality? : torsocks and apparmor
  • Are these listed in the profile? Don't think so

Checklist

  • The upstream profile (and redirect profile if exists) have no changes fixing it.
  • The upstream profile exists (find / -name 'firejail' 2>/dev/null/fd firejail to locate profiles ie in /usr/local/etc/firejail/PROGRAM.profile)
  • Programs needed for interaction are listed.
  • Error was checked in search engine and on issue list without success.

debug output : not sure on how to do that with torsocks.

Thank you very much

Originally created by @Unser395 on GitHub (Aug 30, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3616 Write clear, concise and in textual form. **Bug and expected behavior** - Since I use Firejail by default for all program, I can't launch newsboat through torsocks anymore. It worked fine when I was not using Firejail - What did you expect to happen? To use newsboat through torsocks. Which parameter in the profile is activating newsboat as setuid ? **No profile or disabling firejail** - What changed calling `firejail --noprofile PROGRAM` in a shell? Not sure on how to do this with the torsocks command. I use firejail by default for all program and don't usually type the firejail command in a terminal. **Reproduce** Steps to reproduce the behavior: 1. Enable firejail by default with apparmor 1. Run in bash `torsocks newsboat` 2. See error `ERROR: newsboat is setuid. torsocks will not work on a setuid executable.` **Environment** - Linux distribution and version : Manjaro Linux 20.1 - Firejail version (output of `firejail --version`) exclusive or used git commit (`git rev-parse HEAD`) : firejail version 0.9.62.4 - What other programs interact with the affected program for the functionality? : torsocks and apparmor - Are these listed in the profile? Don't think so **Checklist** - [x] The upstream profile (and redirect profile if exists) have no changes fixing it. - [x] The upstream profile exists (`find / -name 'firejail' 2>/dev/null`/`fd firejail` to locate profiles ie in `/usr/local/etc/firejail/PROGRAM.profile`) - [x] Programs needed for interaction are listed. - [x] Error was checked in search engine and on issue list without success. debug output : not sure on how to do that with torsocks. Thank you very much
Author
Owner

@rusty-snake commented on GitHub (Aug 30, 2020):

If you executed sudo firecfg, the first "newsboat" in $PATH is a symlink to firejail. So you call at the end torsocks firejail newsboat. You could fix this by removing this symlink or torsocks /usr/bin/newsboat but then is newsboat not firejailed. It would be better to use firejail --profile=newsboat torsocks /usr/bin/newsboat. To do so you need to tweak the newsboat profile a bit (private-bin torsocks, private-etc <some tor configs>, noblacklist ${PATH}/nc? and maybe others, but I can not tell you which excatly).

<!-- gh-comment-id:683462108 --> @rusty-snake commented on GitHub (Aug 30, 2020): If you executed `sudo firecfg`, the first "newsboat" in $PATH is a symlink to firejail. So you call at the end `torsocks firejail newsboat`. You could fix this by removing this symlink or `torsocks /usr/bin/newsboat` but then is newsboat not firejailed. It would be better to use `firejail --profile=newsboat torsocks /usr/bin/newsboat`. To do so you need to tweak the newsboat profile a bit (`private-bin torsocks`, `private-etc <some tor configs>`, `noblacklist ${PATH}/nc`? and maybe others, but I can not tell you which excatly).
Author
Owner

@Minoru commented on GitHub (Aug 31, 2020):

Newsboat also has built-in support for proxies, just add something like this to your config:

use-proxy yes
proxy localhost:9150
proxy-type socks5h # SOCKS 5, with DNS proxying
<!-- gh-comment-id:683701424 --> @Minoru commented on GitHub (Aug 31, 2020): Newsboat also has built-in support for proxies, just add something like this to your config: ``` use-proxy yes proxy localhost:9150 proxy-type socks5h # SOCKS 5, with DNS proxying ```
Author
Owner

@Unser395 commented on GitHub (Aug 31, 2020):

Thank you very much to both of you.

I ended up using the built-in support for proxies, but I learned some things I didn't know about Firejail and how it works thanks to your answer rusty-snake.

Have a nice day !

<!-- gh-comment-id:683739618 --> @Unser395 commented on GitHub (Aug 31, 2020): Thank you very much to both of you. I ended up using the built-in support for proxies, but I learned some things I didn't know about Firejail and how it works thanks to your answer rusty-snake. Have a nice day !
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#2272
No description provided.