Can't delete print job: Error: client-error-forbidden

Please post any bugs you have found
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Can't delete print job: Error: client-error-forbidden

#1 Post by disciple »

A couple of other people have reported this problem, but I haven't seen a solution. When I try to delete a print job using the cups web interface, I get the message

Code: Select all

Error: 
client-error-forbidden
I know they can be deleted other ways, but can anyone using the standard CUPS in Puppy 4.x actually successfully delete a print job using the CUPS web interface?
If so, is there anyone using hplip who can?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#2 Post by smokey01 »

disciple,

I haven't manage to get this to work in CUPS either but this works.

To delete all print jobs from the console type "lprm -"

Not sure if this does though.

To delete a particular job type "cancel(1) for job number 1.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post by disciple »

So it looks like a bug...
The CUPS dotpup package that we used to use by Pakt or someone worked fine :(

I wonder if this patch would fix it http://adam.rosi-kessel.org/weblog/2004/12/31/linux

Or maybe it is this. I'm not at home ATM, so I can't check if that section is in the config file...
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#4 Post by disciple »

Yes, that's the problem - stupid design :)
You can cancel jobs if you add

Code: Select all

AuthClass User
to the <Location /printers> section of /etc/cups/cupsd.conf, although it means you have to login :( I wonder if it is possible to somehow login automatically...

Pakt's dotput didn't have this problem, so maybe it had that patch applied.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#5 Post by disciple »

Darn - no, leafpad doesn't seem to be able to print now... what's wrong with these CUPS people?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#6 Post by vtpup »

Yup, wrestling with the same problem here.

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#7 Post by vtpup »

Disciple, what do you think about this:
User
Examples

User lp
User guest

Description

The User directive specifies the UNIX user that filter and CGI programs run as. The default user is _lp.

Note:

You may not use user root, as that would expose the system to unacceptable security risks. The scheduler will automatically choose user nobody if you specify a user whose ID is 0.
There's a User root at the top of cupsd.conf.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#8 Post by disciple »

Yes, I did notice that, but I don't think it is connected with our problem.

The old cups dotpup worked perfectly, and had the same cupsd.conf as in Puppy 4.x, so I'm guessing it had that patch applied to fix this.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#9 Post by ttuuxxx »

try this
http://www.murga-linux.com/puppy/viewto ... h&id=15331
Just install it, then in the menu you'll have 2 new frontends for cups, One will allow you to monitor jobs, cancel current, cancel all jobs etc.

Menu/System/GTKLP
Menu/System/GTKLPQ
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#10 Post by kirk »

I patched cups-1.1.23 to fix that. A pet package is here:

http://puppylinux.asia/tpp/kirk/cups-1.1.23p.pet

Try it booting up ram only and installing it. Just in case your dog explodes or something else horrible happens :)

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#11 Post by vtpup »

Thanks for the help, both of you. But I'm always curious about why something is wrong before just applying a patch. Can you tell me?

Obviously it is trying to authenticate when it shouldn't. I've tried AuthType=None, and AuthClass=Anonymous in every Location, each alone, and both together, with no effect. I've also tried to add location /jobs and used both, again with no effect. every time I try something new I just get in Cups error log:

Code: Select all

E [21/Feb/2009:23:54:31 -0500] Unable to open /etc/cups/passwd.md5 - No such file or directory
E [21/Feb/2009:23:54:31 -0500] cancel_job: "" not authorized to delete job id 1 owned by "root"!
I do stop and restart CUPS with every change, and even reboot to make sure.

Nothing affects its behavior.

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#12 Post by vtpup »

Well, here's a workaround that seems simpler than the web interface.

If you want to cancel job number 1, just type:

Code: Select all

cancel 1
in the console.

Not too hard to remember that one. :?

EDIT: I now see smokey mentioned that one early on :oops:

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#13 Post by disciple »

But I'm always curious about why something is wrong before just applying a patch. Can you tell me?
Read about it in one of the links I posted at the top - basically the CUPS people decided it was too insecure to be able to delete jobs anonymously... rather than putting the onus on network administrators to configure things securely if they want security, they just made it impossible to make it insecure :roll: :roll: :roll:
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#14 Post by vtpup »

Thanks for the reference, Disciple, I see it now, under the "here" in your post which is a bug report.

Actually the report was closed because the bug was supposedly fixed in Cups 1.20.

But we seem to have it here in a later version, so I'm wondering if they did solve it, but inadvertently re-enabled it in this version? What version in the dotpup worked?

Unfortunately, because the issue is closed, no further comments can be added to this particular issue.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#15 Post by disciple »

That was a debian bug report - the way I read it the bug was fixed in Debian's Cups package, not in the upstream CUPS.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
gymnart
Posts: 105
Joined: Wed 10 Dec 2008, 20:32
Contact:

#16 Post by gymnart »

I don't know if this will work well in Puppy but I had to have my SuSE system (CUPS 1.1.23) set up this way in cups.d:

<Location /jobs>

AuthType None
AuthClass User
Allow From @LOCAL
</Location>

I also have the statement RunAsUser set to "No". I am able to cancel any print job this way. I haven't had to do that in a long time so I don't remember if it wants the root password for this or not.

Anyway, like I said, I don't know if this would work in Puppy. I learned about this from the linuxquestions.org forums.

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#17 Post by vtpup »

Thanks for trying gymnart.

In Puppy's CUPS version, that stanza brings up a user/password authentication window when clicking on jobs in the web interface.

If either user or password fields are left blank and the enter button is pushed, the password challenge is repeated and you can't move to the jobs screen.

If any user name and any password are entered, they are accepted, and the jobs screen opens, but the user can't actually delete a job

If root is entered as user, and any password is entered, the user can delete a job.

So, it's possible to semi-authenticate using root, and any word for a password, and then delete a job.

It is a lot easier to just type cancel 1 (for job #1) in the terminal.

User avatar
gymnart
Posts: 105
Joined: Wed 10 Dec 2008, 20:32
Contact:

#18 Post by gymnart »

ok, but what about the statement RunAsUser and set it to "No"? What is it set to right now?

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#19 Post by vtpup »

Hi gymnart, I tried it without the RunAsUser statement, with it set to No, and with and without User set to root. I didn't notice any difference. I killed and restarted CUPS with each try.

User avatar
gymnart
Posts: 105
Joined: Wed 10 Dec 2008, 20:32
Contact:

#20 Post by gymnart »

ok, thanks.

Post Reply