CUPS 배너에서 PDF로의 오류 및 "없음" 배너에도 불구하고 권한이 거부됨

CUPS 배너에서 PDF로의 오류 및 "없음" 배너에도 불구하고 권한이 거부됨

인쇄할 때 "필터링 실패" 메시지가 나타납니다. CUPS 로그에 따르면 배너는 "없음"으로 설정되어 있지만 bannertopdf필터는 여전히 권한 거부 오류 출력과 함께 실패합니다.

D [21/Dec/2020:12:48:31 +0100] [Job 926] PID 88203 (/usr/lib/cups/filter/bannertopdf) stopped with status 1.
...
D [21/Dec/2020:12:48:31 +0100] [Job 926] Error opening banner file: Permission denied
D [21/Dec/2020:12:48:31 +0100] [Job 926] Error: could not read banner file
...

다음은 배너topdf 오류의 전체 로그입니다.

D [21/Dec/2020:12:48:31 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients and dirty files"
D [21/Dec/2020:12:48:31 +0100] [Job 926] Applying default options...
D [21/Dec/2020:12:48:31 +0100] add_job: requesting-user-name="root"
D [21/Dec/2020:12:48:31 +0100] Adding default job-sheets values "none,none"...
I [21/Dec/2020:12:48:31 +0100] [Job 926] Adding start banner page "none".
D [21/Dec/2020:12:48:31 +0100] cupsdMarkDirty(----S)
D [21/Dec/2020:12:48:31 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients and dirty files"
D [21/Dec/2020:12:48:31 +0100] cupsdMarkDirty(---J-)
D [21/Dec/2020:12:48:31 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients and dirty files"
I [21/Dec/2020:12:48:31 +0100] [Job 926] Adding end banner page "none".
I [21/Dec/2020:12:48:31 +0100] [Job 926] File of type application/vnd.cups-pdf-banner queued by "root".
D [21/Dec/2020:12:48:31 +0100] [Job 926] hold_until=0
I [21/Dec/2020:12:48:31 +0100] [Job 926] Queued on "MFCJ470DW" by "root".
D [21/Dec/2020:12:48:31 +0100] [Job 926] time-at-processing=1608551311
D [21/Dec/2020:12:48:31 +0100] cupsdMarkDirty(---J-)
D [21/Dec/2020:12:48:31 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients and dirty files"
D [21/Dec/2020:12:48:31 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients and dirty files"
D [21/Dec/2020:12:48:31 +0100] cupsdMarkDirty(----S)
D [21/Dec/2020:12:48:31 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients and dirty files"
D [21/Dec/2020:12:48:31 +0100] [Job 926] 4 filters for job:
D [21/Dec/2020:12:48:31 +0100] [Job 926] bannertopdf (application/vnd.cups-pdf-banner to application/pdf, cost 32)
D [21/Dec/2020:12:48:31 +0100] [Job 926] pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
D [21/Dec/2020:12:48:31 +0100] [Job 926] pdftops (application/vnd.cups-pdf to application/vnd.cups-postscript, cost 100)
D [21/Dec/2020:12:48:31 +0100] [Job 926] brother_lpdwrapper_mfcj470dw (application/vnd.cups-postscript to printer/MFCJ470DW, cost 0)
D [21/Dec/2020:12:48:31 +0100] [Job 926] job-sheets=none,none
D [21/Dec/2020:12:48:31 +0100] [Job 926] argv[0]="MFCJ470DW"
D [21/Dec/2020:12:48:31 +0100] [Job 926] argv[1]="926"
D [21/Dec/2020:12:48:31 +0100] [Job 926] argv[2]="root"
D [21/Dec/2020:12:48:31 +0100] [Job 926] argv[3]="Test Page"
D [21/Dec/2020:12:48:31 +0100] [Job 926] argv[4]="1"
D [21/Dec/2020:12:48:31 +0100] [Job 926] argv[5]="job-uuid=urn:uuid:e7d8c878-3d1a-373a-6205-0ccb7ee4e2dc job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1608551311 time-at-processing=1608551311"
D [21/Dec/2020:12:48:31 +0100] [Job 926] argv[6]="/var/spool/cups/d00926-001"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[7]="CUPS_STATEDIR=/run/cups"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[8]="HOME=/var/spool/cups/tmp"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[10]="SERVER_ADMIN=root@creeck"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[11]="SOFTWARE=CUPS/2.3.1"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[12]="TMPDIR=/var/spool/cups/tmp"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[13]="USER=root"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[14]="CUPS_MAX_MESSAGE=2047"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[15]="CUPS_SERVER=/run/cups/cups.sock"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[16]="CUPS_ENCRYPTION=IfRequested"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[17]="IPP_PORT=631"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[18]="CHARSET=utf-8"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[19]="LANG=de.UTF-8"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[20]="PPD=/etc/cups/ppd/MFCJ470DW.ppd"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[21]="RIP_MAX_CACHE=128m"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[22]="CONTENT_TYPE=application/vnd.cups-pdf-banner"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[23]="DEVICE_URI=usb:/dev/usb/lp0"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[24]="PRINTER_INFO=MFCJ470DW"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[25]="PRINTER_LOCATION="
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[26]="PRINTER=MFCJ470DW"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[27]="PRINTER_STATE_REASONS=none"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[28]="CUPS_FILETYPE=document"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[29]="FINAL_CONTENT_TYPE=application/vnd.cups-postscript"
D [21/Dec/2020:12:48:31 +0100] [Job 926] envp[30]="AUTH_I****"
I [21/Dec/2020:12:48:31 +0100] [Job 926] Started filter /usr/lib/cups/filter/bannertopdf (PID 88203)
I [21/Dec/2020:12:48:31 +0100] [Job 926] Started filter /usr/lib/cups/filter/pdftopdf (PID 88204)
I [21/Dec/2020:12:48:31 +0100] [Job 926] Started filter /usr/lib/cups/filter/pdftops (PID 88205)
I [21/Dec/2020:12:48:31 +0100] [Job 926] Started filter /usr/lib/cups/filter/brother_lpdwrapper_mfcj470dw (PID 88206)
I [21/Dec/2020:12:48:31 +0100] [Job 926] Started backend /usr/lib/cups/backend/usb (PID 88208)
D [21/Dec/2020:12:48:31 +0100] cupsdMarkDirty(----S)
D [21/Dec/2020:12:48:31 +0100] cupsdSetBusyState: newbusy="Active clients, printing jobs, and dirty files", busy="Active clients and dirty files"
D [21/Dec/2020:12:48:31 +0100] [Client 204] Returning IPP successful-ok for Print-Job (ipp://localhost:631/printers/MFCJ470DW) from localhost.
D [21/Dec/2020:12:48:31 +0100] [Client 204] Content-Length: 190
D [21/Dec/2020:12:48:31 +0100] [Client 204] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [21/Dec/2020:12:48:31 +0100] [Job 926] PID 88203 (/usr/lib/cups/filter/bannertopdf) stopped with status 1.
D [21/Dec/2020:12:48:31 +0100] [Client 204] con->http=0x558c6f9ccea0
D [21/Dec/2020:12:48:31 +0100] [Client 204] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=190, response=0x558c6fa94730(IPP_STATE_IDLE), pipe_pid=0, file=-1
D [21/Dec/2020:12:48:31 +0100] [Client 204] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0
D [21/Dec/2020:12:48:31 +0100] [Client 204] bytes=0, http_state=0, data_remaining=190
D [21/Dec/2020:12:48:31 +0100] [Client 204] Flushing write buffer.
D [21/Dec/2020:12:48:31 +0100] [Client 204] New state is HTTP_STATE_WAITING
D [21/Dec/2020:12:48:31 +0100] [Client 204] Waiting for request.
D [21/Dec/2020:12:48:31 +0100] cupsdSetBusyState: newbusy="Active clients, printing jobs, and dirty files", busy="Active clients, printing jobs, and dirty files"
D [21/Dec/2020:12:48:31 +0100] [Notifier] state=3
D [21/Dec/2020:12:48:31 +0100] [Notifier] state=3
D [21/Dec/2020:12:48:31 +0100] [Notifier] state=3
D [21/Dec/2020:12:48:31 +0100] [Job 926] Error opening banner file: Permission denied
D [21/Dec/2020:12:48:31 +0100] [Job 926] Error: could not read banner file
D [21/Dec/2020:12:48:31 +0100] [Job 926] pdftopdf: Last filter determined by the PPD: brother_lpdwrapper_mfcj470dw; FINAL_CONTENT_TYPE: application/vnd.cups-postscript => pdftopdf will not log pages in page_log.
D [21/Dec/2020:12:48:31 +0100] [Job 926] Input is empty, outputting empty file.
D [21/Dec/2020:12:48:31 +0100] [Job 926] PID 88204 (/usr/lib/cups/filter/pdftopdf) exited with no errors.

입력 및 출력이 비어 있음에도 불구하고 다운스트림 필터(예: pdftops)가 성공적으로 실행됩니다.

D [21/Dec/2020:12:48:31 +0100] [Job 926] pdftops - copying to temp print file \"/tmp/1588d5fec4a35\"
D [21/Dec/2020:12:48:31 +0100] [Job 926] Input is empty, outputting empty file.
D [21/Dec/2020:12:48:31 +0100] [Job 926] PID 88205 (/usr/lib/cups/filter/pdftops) exited with no errors.

기존 배너 파일은 모두 누구나 읽을 수 있지만(전체 경로 포함) 배너가 없습니다 none. 빈 파일을 생성해도 아무 것도 바뀌지 않습니다. 실제로 그러한 파일이 필요하지 않은 것 같습니다.

일부 배경

프린터는 USB와 네트워크를 통해 연결된 Brother MFC-J470DW입니다. 네트워크를 통해 인쇄 작업을 보낼 때도 동일한 문제가 발생합니다.

프린터는 Ubuntu 19.04에서 작동했지만 Ubuntu 20.04.1 LTS(Focal Fossa)로 업그레이드(재설치 아님)한 이후 더 이상 작동하지 않습니다.

이 프린터에는 Brother 드라이버 설치가 필요합니다. 이전 Ubuntu 설치에서는 Brother 설치 프로그램 linux-brprinter-installer-2.1.1-1을 사용하여 설치했습니다. 업그레이드한 후 Brother 설치 프로그램 linux-brprinter-installer-2.2.2-1을 사용하십시오.

패키지 및 버전

  • 프린터 드라이버 설치 스크립트 linux-brprinter-installer-2.2.2-1을 사용하여 다운로드하여 설치했습니다.

    • brscan4-0.4.9-1.amd64.deb
    • brscan-skey-0.3.1-1.amd64.deb
    • mfcj470dwcupswrapper-3.0.0-1a.i386.deb
    • mfcj470dwcupswrapper-3.0.0-1.i386.deb
    • mfcj470dwlpr-3.0.0-1a.i386.deb
    • mfcj470dwlpr-3.0.0-1.i386.deb
  • 관련성이 있을 수 있는 추가 버전

    $ dpkg -l hplip "cups*"
    Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
    | Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
             Halb installiert/Trigger erWartet/Trigger anhängig
    |/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
    ||/ Name                      Version          Architektur  Beschreibung
    +++-=========================-================-============-===================================================================
    ii  cups                      2.3.1-9ubuntu1.1 amd64        Common UNIX Printing System(tm) - PPD/driver support, web interface
    ii  cups-browsed              1.27.4-1         amd64        OpenPrinting CUPS Filters - cups-browsed
    ii  cups-bsd                  2.3.1-9ubuntu1.1 amd64        Common UNIX Printing System(tm) - BSD commands
    ii  cups-client               2.3.1-9ubuntu1.1 amd64        Common UNIX Printing System(tm) - client programs (SysV)
    ii  cups-common               2.3.1-9ubuntu1.1 all          Common UNIX Printing System(tm) - common files
    ii  cups-core-drivers         2.3.1-9ubuntu1.1 amd64        Common UNIX Printing System(tm) - driverless printing
    ii  cups-daemon               2.3.1-9ubuntu1.1 amd64        Common UNIX Printing System(tm) - daemon
    ii  cups-filters              1.27.4-1         amd64        OpenPrinting CUPS Filters - Main Package
    ii  cups-filters-core-drivers 1.27.4-1         amd64        OpenPrinting CUPS Filters - Driverless printing
    un  cups-filters-ippusbxd     <keine>          <keine>      (keine Beschreibung vorhanden)
    ii  cups-ipp-utils            2.3.1-9ubuntu1.1 amd64        Common UNIX Printing System(tm) - IPP developer/admin utilities
    un  cups-pdf                  <keine>          <keine>      (keine Beschreibung vorhanden)
    ii  cups-pk-helper            0.2.6-1ubuntu3   amd64        PolicyKit helper to configure cups with fine-grained privileges
    ii  cups-ppdc                 2.3.1-9ubuntu1.1 amd64        Common UNIX Printing System(tm) - PPD manipulation utilities
    ii  cups-server-common        2.3.1-9ubuntu1.1 all          Common UNIX Printing System(tm) - server common files
    rc  hplip                     3.20.3+dfsg0-2   amd64        HP Linux Printing and Imaging System (HPLIP)
    

답변1

나에게 솔루션은 매우 간단했지만 CUPS 구성이 거의 수정되지 않았고 저장할 가치가 없었기 때문이었습니다.

CUPS 및 프린터와 관련된 패키지를 "제거"했습니다. 원래,

# Purge CUPS-related packages
apt purge cups cups-client cups-daemon cups-common cups-filters cups-filters-core-drivers  cups-ipp-utils  cups-pk-helper cups-ppdc cups-server-common 

# Purge Brother packages
apt purge mfcj470dwcupswrapper mfcj470dwlpr

청소를 통해 시스템 전체 구성(손상된 것으로 보이는)이 모두 제거되었습니다. CUPS 구성이 수정된 경우 먼저 백업해야 합니다! (어쨌든 당신은 그것들을 가지고 있습니다. 그렇죠 ;-) )

그 후 CUPS를 다시 설치했습니다.

apt install cups cups-client

형제들과 함께 팩

sudo bash linux-brprinter-installer-2.2.2-1

관련 정보