Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Forbidden error in CUPS [solved]

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
mani001
Guru
Guru
Posts: 491
Joined: Sat Dec 04, 2004 12:41 pm
Location: Oleiros

Forbidden error in CUPS [solved]

  • Quote

Post by mani001 » Mon Jul 18, 2022 9:05 pm

Hi,

I'm trying to resume (don't know why it was stopped) my printer through CUPS web interface , and after entering the root password I get a "Forbidden" error. I did this before..but probably a long time ago. Hence, I'm guessing it's some new setting somewhere :? Any clue?

Cheers.
Last edited by mani001 on Tue Jul 19, 2022 7:36 pm, edited 1 time in total.
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Tue Jul 19, 2022 3:54 am

Not much information. Maybe you need to restart cupsd? There was a recent update. Did you update?
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
mani001
Guru
Guru
Posts: 491
Joined: Sat Dec 04, 2004 12:41 pm
Location: Oleiros

  • Quote

Post by mani001 » Tue Jul 19, 2022 1:11 pm

Thanks for the prompt reply!!

Yes, I tried restarting cups (even the machine, which is overkill)

Sorry about the too-little-info. I'm using the last version of CUPS (cups-2.4.2-r1 and cups-filters-1.28.15). Another possibly important bit: I'm using hplip (meaning among other things, I didn't add the printer manually). Actually, at work (same package versions), where I rely on remote printers, everything is fine, and I don't get any "Forbidden" screens.

Cheers.
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Tue Jul 19, 2022 4:21 pm

Did you run rc-update or dispatch-conf after updating cups? The default for a printing error changed from stop to retry. Besides, consider that a printer in cups, will not usually pause unless it is experiencing a failure to be able print error. Although I do have hplip installed, the print queues I actually use are all hand-jammed using the cups localhost:631 interface with LPD and hand picking the driver. The queue for my HP Laserjet 3055 looks like: " lpd://192.168.0.204/lp" and a well working PostScript ppd from GutenPrint.

Lots of things you could try.
1. Roll back the version of cups.
2. Hand make a new cups queue
3. Try set up a queue with ipp everywhere if supported by your printer:

Code: Select all

lpadmin -p SL-M332ND-ipp -E -v ipp://192.168.0.206/ipp/print -m everywhere
Is your HP printer the CUPS default printer? What is the return for the command lpq? If yes, you should be able to "lpr textfile" to the printer, as long as it's not "stopped" or "paused" due to some error.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
mani001
Guru
Guru
Posts: 491
Joined: Sat Dec 04, 2004 12:41 pm
Location: Oleiros

  • Quote

Post by mani001 » Tue Jul 19, 2022 7:36 pm

Following https://askubuntu.com/a/1390539 I ended up "fixing it" by adding my user to the lpadmin group:

Code: Select all

gpasswd -a manu lpadmin
I feel this is a half-ass solution :oops: but whatever...

Thanks for all the tips anyway!!
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Wed Jul 20, 2022 4:08 am

Being a long-time user, I assumed you were already a member of lpadmin. That is a prerequisite. This let's you manage cups issues (i.e. jobs) as a user.
ADDED: You can, of course, manage printer issues as root. Apparently, the presenting issue just went away on its own.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
paulj
Guru
Guru
User avatar
Posts: 546
Joined: Thu Sep 30, 2004 4:55 am
Location: Wales, UK

  • Quote

Post by paulj » Sat Jul 23, 2022 5:17 pm

I am having a similar problem. Cups has been working here without issue since I built the PC over a year ago, but suddenly printing has stopped. I tracked the problem down to a change in IP address assigned to the printer, so I changed the settings in my router to assign a static IP, and I can see that the printer is indeed being given this IP address. However, since the old one was im the middle of the dynamic assign range, I want to change the IP address assigned to the printer in cups, so if can find the printer again. However, when I try to do this, after logging in as root, I am getting the forbidden error.
Here are my system details:
  • cups-2.4.2-r1
  • cups-filters-1.28.15
  • Printer is a network printer - Brother HL-L8260CDW. Prints using IPP
  • unmodified config file
  • My user is in the lp and lpadmin groups
I tried rolling back to the earlier version available in portage - 2.3.3_p2-r3, but no change. Interesting I did this by un-merging 2.4.2, deleting /usr/cups and then installing 2.3.3_p2-r3, but my printers were still known by the system after restarting cupsd. The "forbidden" message comes from any action to change details, including deleting /cancelling a job.

Any tips would be useful!

TIA

I have resolved my issue. It seems that although previously it wasn't necessary, using root to make changes does require root to be in the lpadmin group. This might have been a change in the latest release, but to be honest I have had no need to change any printer properties or manage any jobs recently so it could be older. I am not sure where this is set in the configuration file.

Of course, what I hadn't previously considered, but should have - I shouldn't be using root anyway, since the user account can make the necessary changes. Logging as my user account with no changes to the current group status demonstrated this.
Last edited by paulj on Sun Jul 24, 2022 6:58 am, edited 1 time in total.
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Sat Jul 23, 2022 7:56 pm

You can save a lot of grief by setting a static IP address in the PRINTER, not the router. You can do that using the LCD panel on the printer or using the printer's web interface that you access with a web browser.

I keep a specific IP range just for printers, so it's easy to remember the IP address of each printer, i.e. printer #1 is at 192.168.1.200, printer #2 is at 192.168.1.201, and so on. For such a range, limit the DHCP range in the router to no higher than 192.168.1.199 or lower.

Your mileage may vary, but I only let my router manage portable devices, i.e. tablets, phones, laptops. I assign static IP addresses manually for all permanent devices, i.e. desktop computers, printers, other network devices such as access points, smart switches, cameras, and so on.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
paulj
Guru
Guru
User avatar
Posts: 546
Joined: Thu Sep 30, 2004 4:55 am
Location: Wales, UK

  • Quote

Post by paulj » Sun Jul 24, 2022 6:57 am

figueroa wrote:You can save a lot of grief by setting a static IP address in the PRINTER, not the router. You can do that using the LCD panel on the printer or using the printer's web interface that you access with a web browser.
Thanks!

I never considered doing it this way, but it makes sense. I have already set a range on the IP addresses which can be dynamically assigned, but have used the router in the past for static addresses as well. I have now reconfigured my printer as you have recommended, and follow this approach in the future.
Top
Vorlon
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Fri May 16, 2003 7:17 pm
Location: East Earl, PA
Contact:
Contact Vorlon
Website

  • Quote

Post by Vorlon » Sat Aug 20, 2022 12:05 pm

I confirm the fix. Even if running as root, you have to add root to the lpadmin group.

I did it by "usermod -aG lpadmin root"
Casey Bralla
Chief Nerd in Residence
The NerdWorld Organisation
Top
Post Reply

10 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic