Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to save PPD file: Permission denied #29

Open
andykelk opened this issue Jan 20, 2024 · 1 comment
Open

Unable to save PPD file: Permission denied #29

andykelk opened this issue Jan 20, 2024 · 1 comment

Comments

@andykelk
Copy link

I'm unable to add a new USB printer using this container. I got it to detect the printer and selected a driver but it fails with an error "Unable to save PPD file: Permission denied". In the cups logs, I get:
Unable to create "/etc/cups/ppd/Brother_DCP-1510_series.ppd.N": Permission denied

My docker-compose file has:

services:
  cups:
    image: chuckcharlie/cups-avahi-airprint:latest
    container_name: cups
    network_mode: host
    volumes:
      - ./services:/services
      - ./config:/config
      - /run/dbus:/run/dbus
      - /dev/bus/usb:/dev/bus/usb
    privileged: true
    environment:
      CUPSADMIN: "xx"
      CUPSPASSWORD: "xx"
    restart: unless-stopped

If I get a shell inside the container, I can touch a file in that directory:

/ # ls -l /etc/cups/ppd/
total 0
-rw-r--r--    1 root     root             0 Jan 20 08:31 Brother_DCP-1510_series.ppd.N

and it shows up on the host:

~/docker/cups$ ls -l config/ppd/
total 0
-rw-r--r-- 1 root root 0 Jan 20 19:31 Brother_DCP-1510_series.ppd.N

This is running on a fresh install of Ubuntu server 22.04.3 LTS using the distro installed docker.io and docker-compose packages. I did originally have the snap version of docker installed but I removed that to try and eliminate it as a cause.

@asmerkin
Copy link

- /dev/bus/usb:/dev/bus/usb this line goes under devices, not under volumes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants