Writing filter: "Permission denied"

Yu Guo Victor.Yu.Guo at gmail.com
Sun Jul 16 11:54:54 PDT 2006


I am trying to write a filter for cups. I am using Fedora Core 4.

I put my filter (called cups_test1) into /usr/lib/cups/filter.
I create a printer (called STK500) and put its ppd under /etc/cups.
Ihe ppd has this line:  *cupsFilter:    "text/plain 0 cups_test1"

After I restart the cups, I want to print a text file named "tp" for only test, using "lp tp".
But I get nothing.

I check out the error log by means of
"cat /var/log/cups/error_log"

It did call my filter but there is a "Permission denied" Error.

E [16/Jul/2006:20:40:17 +0200] PID 3352 stopped with status 22!
D [16/Jul/2006:20:40:17 +0200] [Job 39] /usr/lib/cups/filter/cups_test1: Permission denied

I have already changed the permission of the filter (cups_test1) to 777, but still does not work.

Could anyone help me with problem? Thanks in advance!

I attach the error log when printing the "tp" file.

D [16/Jul/2006:20:40:16 +0200] AcceptClient: 6 from localhost:631.
D [16/Jul/2006:20:40:16 +0200] ReadClient: 6 POST / HTTP/1.1
D [16/Jul/2006:20:40:16 +0200] ProcessIPPRequest: 6 status_code=1
D [16/Jul/2006:20:40:16 +0200] ReadClient: 6 POST / HTTP/1.1
D [16/Jul/2006:20:40:16 +0200] ProcessIPPRequest: 6 status_code=1
D [16/Jul/2006:20:40:17 +0200] ReadClient: 6 POST / HTTP/1.1
D [16/Jul/2006:20:40:17 +0200] ProcessIPPRequest: 6 status_code=0
D [16/Jul/2006:20:40:17 +0200] AcceptClient: 8 from localhost:631.
D [16/Jul/2006:20:40:17 +0200] CloseClient: 6
D [16/Jul/2006:20:40:17 +0200] ReadClient: 8 POST /printers/STK500 HTTP/1.1
D [16/Jul/2006:20:40:17 +0200] print_job: auto-typing file...
D [16/Jul/2006:20:40:17 +0200] print_job: request file type is text/plain.
D [16/Jul/2006:20:40:17 +0200] check_quotas: requesting-user-name = 'root'
D [16/Jul/2006:20:40:17 +0200] print_job: requesting-user-name = 'root'
I [16/Jul/2006:20:40:17 +0200] Adding start banner page "none" to job 39.
I [16/Jul/2006:20:40:17 +0200] Adding end banner page "none" to job 39.
I [16/Jul/2006:20:40:17 +0200] Job 39 queued on 'STK500' by 'root'.
D [16/Jul/2006:20:40:17 +0200] Job 39 hold_until = 0
D [16/Jul/2006:20:40:17 +0200] StartJob(39, 0x9568e30)
D [16/Jul/2006:20:40:17 +0200] StartJob() id = 39, file = 0/1
D [16/Jul/2006:20:40:17 +0200] job-sheets=none,none
D [16/Jul/2006:20:40:17 +0200] banner_page = 0
D [16/Jul/2006:20:40:17 +0200] StartJob: argv = "STK500","39","root","tp","1","","/var/spool/cups/d00039-001"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[0]="PATH=/usr/lib/cups/filter:/bin:/usr/bin"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[1]="SOFTWARE=CUPS/1.1"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[2]="USER=root"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[3]="CHARSET=utf-8"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[4]="LANG=en_US"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[5]="PPD=/etc/cups/ppd/STK500.ppd"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[6]="CUPS_SERVERROOT=/etc/cups"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[7]="RIP_MAX_CACHE=8m"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[8]="TMPDIR=/var/spool/cups/tmp"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[9]="CONTENT_TYPE=text/plain"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[10]="DEVICE_URI=serial:/dev/ttyUSB0?baud=9600+bits=8+parity=none+flow=none"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[11]="PRINTER=STK500"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[12]="CUPS_DATADIR=/usr/share/cups"D [16/Jul/2006:20:40:17 +0200] StartJob: envp[13]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[14]="CUPS_SERVER=localhost"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[15]="IPP_PORT=631"
D [16/Jul/2006:20:40:17 +0200] StartJob: envp[16]="DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-22IMMEvSzd,guid=3583ba445340dab91c8d0cb0e313e200"
D [16/Jul/2006:20:40:17 +0200] StartJob: statusfds = [ 6 9 ]
D [16/Jul/2006:20:40:17 +0200] StartJob: filterfds[1] = [ 10 -1 ]
D [16/Jul/2006:20:40:17 +0200] StartJob: filter = "/usr/lib/cups/filter/cups_test1"
D [16/Jul/2006:20:40:17 +0200] StartJob: filterfds[0] = [ 11 12 ]
D [16/Jul/2006:20:40:17 +0200] start_process("/usr/lib/cups/filter/cups_test1", 0xbf9ceb90, 0xbf9ce108, 10, 12, 9)
I [16/Jul/2006:20:40:17 +0200] Started filter /usr/lib/cups/filter/cups_test1 (PID 3352) for job 39.
D [16/Jul/2006:20:40:17 +0200] StartJob: backend = "/usr/lib/cups/backend/serial"
D [16/Jul/2006:20:40:17 +0200] StartJob: filterfds[1] = [ -1 10 ]
D [16/Jul/2006:20:40:17 +0200] start_process("/usr/lib/cups/backend/serial", 0xbf9ceb90, 0xbf9ce108, 11, 10, 9)
I [16/Jul/2006:20:40:17 +0200] Started backend /usr/lib/cups/backend/serial (PID 3353) for job 39.
D [16/Jul/2006:20:40:17 +0200] ProcessIPPRequest: 8 status_code=0
E [16/Jul/2006:20:40:17 +0200] PID 3352 stopped with status 22!
D [16/Jul/2006:20:40:17 +0200] [Job 39] /usr/lib/cups/filter/cups_test1: Permission denied
D [16/Jul/2006:20:40:17 +0200] CloseClient: 8
D [16/Jul/2006:20:40:17 +0200] UpdateJob: job 39, file 0 is complete.
D [16/Jul/2006:20:40:17 +0200] CancelJob: id = 39
D [16/Jul/2006:20:40:17 +0200] StopJob: id = 39, force = 0
D [16/Jul/2006:20:40:17 +0200] StopJob: printer state is 3





More information about the cups mailing list