[GH-ISSUE #1474] whitelist /dev/serial #990

Closed
opened 2026-05-05 07:16:15 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @kdalgain on GitHub (Aug 18, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1474

Hi,

I use a private instance of Android Studio and whould like to connect a smartphone.

As I understand, the private-dev directive deny access to /dev/serial or /dev/ttyACM0. And, a workaround is to use some whitelist directives.

Thus, I replaced private-dev with

whitelist /dev/dri
whitelist /dev/full
whitelist /dev/log
whitelist /dev/null
whitelist /dev/ptmx
whitelist /dev/pts
whitelist /dev/random
whitelist /dev/shm
whitelist /dev/snd
whitelist /dev/tty
whitelist /dev/urandom
whitelist /dev/zero
whitelist /dev/serial
whitelist /dev/ttyACM0

Now, if I plug the mobile and start a firejail session, it seems to work:

$ ls /dev/
dri   null  pts     serial  snd  ttyACM0  zero
full  ptmx  random  shm     tty  urandom

But it's not the case if I first start a firejail session and next plug the mobile:

$ ls /dev/
dri  full  null  ptmx  pts  random  shm  snd  tty  urandom  zero

Regards,
Krin D.

Originally created by @kdalgain on GitHub (Aug 18, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1474 Hi, I use a private instance of Android Studio and whould like to connect a smartphone. As I understand, the ``private-dev`` directive deny access to ``/dev/serial`` or ``/dev/ttyACM0``. And, a workaround is to use some ``whitelist`` directives. Thus, I replaced ``private-dev`` with ``` whitelist /dev/dri whitelist /dev/full whitelist /dev/log whitelist /dev/null whitelist /dev/ptmx whitelist /dev/pts whitelist /dev/random whitelist /dev/shm whitelist /dev/snd whitelist /dev/tty whitelist /dev/urandom whitelist /dev/zero whitelist /dev/serial whitelist /dev/ttyACM0 ``` Now, if I plug the mobile and start a _firejail_ session, it seems to work: ``` $ ls /dev/ dri null pts serial snd ttyACM0 zero full ptmx random shm tty urandom ``` But it's not the case if I first start a _firejail_ session and next plug the mobile: ``` $ ls /dev/ dri full null ptmx pts random shm snd tty urandom zero ``` Regards, Krin D.
gitea-mirror 2026-05-05 07:16:15 -06:00
Author
Owner

@netblue30 commented on GitHub (Aug 18, 2017):

Once you start the sandbox, you cannot bring in new files in the whitelist. It is a limitation of the current whitelisting technology.

<!-- gh-comment-id:323353467 --> @netblue30 commented on GitHub (Aug 18, 2017): Once you start the sandbox, you cannot bring in new files in the whitelist. It is a limitation of the current whitelisting technology.
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#990
No description provided.