containers / containers/toolbox

Permission denied on /dev/usb/lp0

Open
#1,617 1 comment 0 reactions 0 assignees View on GitHub
1. Bug
Dominant language
Go
Stars
3.5k
Forks
262
Avg merge
3d 1h
Merged PRs (30d)
1

Description

**Describe the bug**
I'm trying to write to `/dev/usb/lp0` from a toolbox container to print but I get `permission denied` (even with root). I tried add myself to `lp` group but it does not help. It works on host. I tried disable SELinux but no changes.

```
⬢ [william@toolbx Documents]$ ls -l /dev/usb
total 0
crw-------. 1 nobody nobody 180, 96 7 mars 09:32 hiddev0
crw-rw----. 1 nobody nobody 180, 0 7 mars 10:05 lp0
```

```
⬢ [william@toolbx Documents]$ echo "test" > /dev/usb/lp0
bash: /dev/usb/lp0: Permission non accordée
⬢ [william@toolbx Documents]$ sudo echo "test" > /dev/usb/lp0
bash: /dev/usb/lp0: Permission non accordée
```

```
⬢ [william@toolbx Documents]$ groups
william lp wheel
```

**Expected behaviour**
I can send bytes to printer file

**Actual behaviour**
Always get `Permission denied`

**Output of `toolbox --version` (v0.0.90+)**
```
❯ toolbox --version
toolbox version 0.1.1
```

**Toolbx package info (`rpm -q toolbox`)**
```
❯ rpm -q toolbox
toolbox-0.1.1-1.fc41.x86_64
```

**Output of `podman version`**
```
❯ podman version
Client: Podman Engine
Version: 5.3.2
API Version: 5.3.2
Go Version: go1.23.4
Built: Wed Jan 22 01:00:00 2025
OS/Arch: linux/amd64
```

**Podman package info (`rpm -q podman`)**
```
❯ rpm -q podman
podman-5.3.2-1.fc41.x86_64
```

**Info about your OS**
Fedora Silverblue 41

**Additional context**

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by reproducing the toolbox-container access failure with /dev/usb/lp0 and compare the container's device ownership and permissions with the host. Done means the documented printer device can accept bytes from the container without the reported permission error.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.