Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Forbidden error in CUPS [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mani001
Guru
Guru


Joined: 04 Dec 2004
Posts: 487
Location: Oleiros

PostPosted: Mon Jul 18, 2022 9:05 pm    Post subject: Forbidden error in CUPS [solved] Reply with quote

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
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3007
Location: Edge of marsh USA

PostPosted: Tue Jul 19, 2022 3:54 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
mani001
Guru
Guru


Joined: 04 Dec 2004
Posts: 487
Location: Oleiros

PostPosted: Tue Jul 19, 2022 1:11 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3007
Location: Edge of marsh USA

PostPosted: Tue Jul 19, 2022 4:21 pm    Post subject: Reply with quote

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:
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
Back to top
View user's profile Send private message
mani001
Guru
Guru


Joined: 04 Dec 2004
Posts: 487
Location: Oleiros

PostPosted: Tue Jul 19, 2022 7:36 pm    Post subject: Reply with quote

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

Code:
gpasswd -a manu lpadmin


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

Thanks for all the tips anyway!!
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3007
Location: Edge of marsh USA

PostPosted: Wed Jul 20, 2022 4:08 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 526
Location: Wales, UK

PostPosted: Sat Jul 23, 2022 5:17 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3007
Location: Edge of marsh USA

PostPosted: Sat Jul 23, 2022 7:56 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 526
Location: Wales, UK

PostPosted: Sun Jul 24, 2022 6:57 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Vorlon
Apprentice
Apprentice


Joined: 16 May 2003
Posts: 263
Location: East Earl, PA

PostPosted: Sat Aug 20, 2022 12:05 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum