cancel print job via web interface

Martin martin.neisen at iwr.uni-heidelberg.de
Fri Aug 20 06:40:32 PDT 2004


Dear list members,
we are running CUPS 1.1.20 on Solaris server.
Different client types print to this server.
Using command line to cancel jobs works well.
Using the web interface (server:631) to cancel
my own print job shows up the error

"client-error-forbidden".

Looking this newsgroup messages and also other
hints in the web, leads to the assumption the
config file is the key to this error.
Changing the cupsd.conf in different ways
doesn't really help.

Attached you find an excerpt of
error_log and cupsd.conf

Does anybody have a running system with the ability
to cancel jobs (the own ones or although all jobs)
via the web interface ?
Where is the mistake in my config?

I appreciate your help,
thank you

Martin


error_log
#############################################################
d [20/Aug/2004:14:03:49 -0100] FindBest: best = "/"
d [20/Aug/2004:14:03:49 -0100] IsAuthorized: auth = 0, satisfy=0...
d [20/Aug/2004:14:03:49 -0100] get_file() 14 filename=/usr/share/doc/cups/images/hold-job.gif size=228
d [20/Aug/2004:14:03:49 -0100] IsCGI(con=73460, filename="/usr/share/doc/cups/images/hold-job.gif", filestats=ffbf33c8, type=image/gif)
d [20/Aug/2004:14:03:49 -0100] IsCGI: Returning 0...
D [20/Aug/2004:14:03:49 -0100] SendFile() 14 file=16
d [20/Aug/2004:14:03:49 -0100] SendFile: Adding fd 14 to OutputSet...
d [20/Aug/2004:14:03:49 -0100] WriteClient: Removing fd 9 from OutputSet...
d [20/Aug/2004:14:03:49 -0100] WriteClient: Removing fd 10 from InputSet...
d [20/Aug/2004:14:03:49 -0100] WriteClient: 9 Closing data file 10.
d [20/Aug/2004:14:03:49 -0100] WriteClient: Removing fd 12 from OutputSet...
d [20/Aug/2004:14:03:49 -0100] WriteClient: Removing fd 13 from InputSet...
d [20/Aug/2004:14:03:49 -0100] WriteClient: 12 Closing data file 13.
d [20/Aug/2004:14:03:49 -0100] WriteClient: Removing fd 11 from OutputSet...
d [20/Aug/2004:14:03:49 -0100] WriteClient: Removing fd 15 from InputSet...
d [20/Aug/2004:14:03:49 -0100] WriteClient: 11 Closing data file 15.
d [20/Aug/2004:14:03:49 -0100] WriteClient: Removing fd 14 from OutputSet...
d [20/Aug/2004:14:03:49 -0100] WriteClient: Removing fd 16 from InputSet...
d [20/Aug/2004:14:03:49 -0100] WriteClient: 14 Closing data file 16.
I [20/Aug/2004:14:03:49 -0100] [Job 1018] name = '14_03_48.247_pid_16370'
I [20/Aug/2004:14:03:49 -0100] [Job 1018] id = '10957'
d [20/Aug/2004:14:03:51 -0100] ReadClient() 11, used=0
D [20/Aug/2004:14:03:51 -0100] ReadClient() 11 GET /jobs/?op=cancel-job&job_id=1018&job_printer_uri=/printers/dubex HTTP/1.1
d [20/Aug/2004:14:03:51 -0100] decode_auth(70830): Authorization string = ""
d [20/Aug/2004:14:03:51 -0100] decode_auth() 11 username=""
d [20/Aug/2004:14:03:51 -0100] IsAuthorized: con->uri = "/jobs/?op=cancel-job&job_id=1018&job_printer_uri=/printers/dubex" d [20/Aug/2004:14:03:51 -0100] FindBest: uri = "/jobs/?op=cancel-job&job_id=1018&job_printer_uri=/printers/dubex"...
d [20/Aug/2004:14:03:51 -0100] FindBest: Location / Limit 7f
d [20/Aug/2004:14:03:51 -0100] FindBest: Location /jobs Limit 7f
d [20/Aug/2004:14:03:51 -0100] FindBest: Location /admin Limit 7f
d [20/Aug/2004:14:03:51 -0100] FindBest: best = "/jobs"
d [20/Aug/2004:14:03:51 -0100] IsAuthorized: auth = 0, satisfy=1...
d [20/Aug/2004:14:03:51 -0100] IsAuthorized: username = "" password = 0 chars
d [20/Aug/2004:14:03:51 -0100] argv[0] = ""
d [20/Aug/2004:14:03:51 -0100] envp[0] = "PATH=/bin:/usr/bin"
d [20/Aug/2004:14:03:51 -0100] envp[1] = "SERVER_SOFTWARE=CUPS/1.1"
d [20/Aug/2004:14:03:51 -0100] envp[2] = "GATEWAY_INTERFACE=CGI/1.1"
d [20/Aug/2004:14:03:51 -0100] envp[3] = "SERVER_PROTOCOL=HTTP/1.1"
d [20/Aug/2004:14:03:51 -0100] envp[4] = "REDIRECT_STATUS=1"
d [20/Aug/2004:14:03:51 -0100] envp[5] = "CUPS_SERVER=localhost"
d [20/Aug/2004:14:03:51 -0100] envp[6] = "IPP_PORT=631"
d [20/Aug/2004:14:03:51 -0100] envp[7] = "SERVER_NAME=cups2"
d [20/Aug/2004:14:03:51 -0100] envp[8] = "SERVER_PORT=631"
d [20/Aug/2004:14:03:51 -0100] envp[9] = "REMOTE_ADDR=xxx.yyy.iii.kkk"
d [20/Aug/2004:14:03:51 -0100] envp[10] = "REMOTE_HOST=xxx.yyy.iii.kkk"
d [20/Aug/2004:14:03:51 -0100] envp[11] = "REMOTE_USER="
d [20/Aug/2004:14:03:51 -0100] envp[12] = "LANG=C.UTF-8"
d [20/Aug/2004:14:03:51 -0100] envp[13] = "TZ=MET"
d [20/Aug/2004:14:03:51 -0100] envp[14] = "TMPDIR=/var/spool/cups/tmp"
d [20/Aug/2004:14:03:51 -0100] envp[15] = "CUPS_DATADIR=/usr/share/cups"
d [20/Aug/2004:14:03:51 -0100] envp[16] = "CUPS_SERVERROOT=/etc/cups"
d [20/Aug/2004:14:03:51 -0100] envp[17] = "HTTP_USER_AGENT=Opera/7.50 (X11; Linux i686; U)  [en]"
d [20/Aug/2004:14:03:51 -0100] envp[18] = "SCRIPT_NAME=/jobs/"
d [20/Aug/2004:14:03:51 -0100] envp[19] = "REQUEST_METHOD=GET"
d [20/Aug/2004:14:03:51 -0100] envp[20] = "QUERY_STRING=op=cancel-job&job_id=1018&job_printer_uri=/printers/dubex"
d [20/Aug/2004:14:03:51 -0100] AddCert: adding certificate for pid 16372
D [20/Aug/2004:14:03:51 -0100] CGI /usr/lib/cups/cgi-bin/jobs.cgi started - PID = 16372
I [20/Aug/2004:14:03:51 -0100] Started "/usr/lib/cups/cgi-bin/jobs.cgi" (pid=16372)
D [20/Aug/2004:14:03:51 -0100] SendCommand() 11 file=13
d [20/Aug/2004:14:03:51 -0100] SendCommand: Adding fd 13 to InputSet...
d [20/Aug/2004:14:03:51 -0100] SendCommand: Adding fd 11 to OutputSet...
d [20/Aug/2004:14:03:51 -0100] AcceptClient(5e928) 0 NumClients = 4
D [20/Aug/2004:14:03:51 -0100] AcceptClient() 10 from localhost:631.
d [20/Aug/2004:14:03:51 -0100] AcceptClient: Adding fd 10 to InputSet...
d [20/Aug/2004:14:03:51 -0100] WriteClient() 11 Content-Type: text/html;charset=iso-8859-1
d [20/Aug/2004:14:03:51 -0100] WriteClient() 11
d [20/Aug/2004:14:03:51 -0100] WriteClient() 11 1160 bytes
d [20/Aug/2004:14:03:51 -0100] ReadClient() 10, used=0
D [20/Aug/2004:14:03:51 -0100] ReadClient() 10 POST /jobs HTTP/1.1
d [20/Aug/2004:14:03:51 -0100] decode_auth(76090): Authorization string = ""
d [20/Aug/2004:14:03:51 -0100] decode_auth() 10 username=""
d [20/Aug/2004:14:03:51 -0100] IsAuthorized: con->uri = "/jobs"
d [20/Aug/2004:14:03:51 -0100] FindBest: uri = "/jobs"...
d [20/Aug/2004:14:03:51 -0100] FindBest: Location / Limit 7f
d [20/Aug/2004:14:03:51 -0100] FindBest: Location /jobs Limit 7f
d [20/Aug/2004:14:03:51 -0100] FindBest: Location /admin Limit 7f
d [20/Aug/2004:14:03:51 -0100] FindBest: best = "/jobs"
d [20/Aug/2004:14:03:51 -0100] IsAuthorized: auth = 0, satisfy=1...
d [20/Aug/2004:14:03:51 -0100] IsAuthorized: username = "" password = 0 chars
d [20/Aug/2004:14:03:51 -0100] POST /jobs
d [20/Aug/2004:14:03:51 -0100] CONTENT_TYPE = application/ipp
d [20/Aug/2004:14:03:51 -0100] ReadClient() 10 con->data_encoding = length, con->data_remaining = 139, con->file = 0
d [20/Aug/2004:14:03:51 -0100] ProcessIPPRequest(76090[10]): operation_id = 0008
d [20/Aug/2004:14:03:51 -0100] cancel_job(76090[10], ipp://localhost/jobs/1018)
d [20/Aug/2004:14:03:51 -0100] validate_user(76090[10], "user012", ffbf1ad0, 1024)
d [20/Aug/2004:14:03:51 -0100] GetMD5Passwd(username="", group="lp", passwd=ffbf1230)
E [20/Aug/2004:14:03:51 -0100] cancel_job: "" not authorized to delete job id 1018 owned by "user012"!
d [20/Aug/2004:14:03:51 -0100] send_ipp_error(76090[10], 401)
D [20/Aug/2004:14:03:51 -0100] Sending error: client-error-forbidden
D [20/Aug/2004:14:03:51 -0100] ProcessIPPRequest: 10 status_code=401
d [20/Aug/2004:14:03:51 -0100] ProcessIPPRequest: Adding fd 10 to OutputSet...
d [20/Aug/2004:14:03:51 -0100] WriteClient: Removing fd 10 from OutputSet...
d [20/Aug/2004:14:03:51 -0100] ReadClient() 10, used=0
D [20/Aug/2004:14:03:51 -0100] CloseClient() 10
d [20/Aug/2004:14:03:51 -0100] CloseClient: Removing fd 10 from InputSet and OutputSet...
d [20/Aug/2004:14:03:51 -0100] WriteClient: Removing fd 11 from OutputSet...
d [20/Aug/2004:14:03:51 -0100] WriteClient: Removing fd 13 from InputSet...
d [20/Aug/2004:14:03:51 -0100] WriteClient: 11 Closing data file 13.
d [20/Aug/2004:14:03:51 -0100] PID 16372 exited with no errors.
d [20/Aug/2004:14:03:51 -0100] DeleteCert: removing certificate for pid 16372
*************************************************************
#############################################################


cupsd.conf (first try)
#############################################################
User lp
Group sys
RunAsUser true
SystemGroup lp
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From xxx.yyy.iii.0/24
Allow From xxx.yyy.jjj.0/24
</Location>
<Location /admin>
AuthType Basic
AuthClass System
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From xxx.yyy.iii.kkk
</Location>
*************************************************************
#############################################################



cupsd.conf (after several other tests, still not working..)
##############################################################
User lp
Group lp
RunAsUser Yes
SystemGroup lp
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From xxx.yyy.iii.0/24
Allow From xxx.yyy.jjj.0/24
</Location>
<Location /jobs>
AuthType None
AuthClass Group
AuthGroupName lp
Order Deny,Allow
Allow From *.mydomain.de
Satisfy Any
</Location>
<Location /admin>
AuthType BasicDigest
AuthClass Group
AuthGroupName sys
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From xxx.yyy.iii.kkk
</Location>
**************************************************************
##############################################################







More information about the cups mailing list