LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-15-2008, 02:17 PM   #1
DLHOMME
LQ Newbie
 
Registered: Dec 2005
Location: LÚvis, Qc, Canada
Distribution: Suse 10.2
Posts: 26

Rep: Reputation: 15
Smile CUPS - 403 Forbidden message


I have a print server running Suse 11 on which three printers were setup using the CUPS interface. All three printers run OK.
From a laptop, thru a wifi I can access the server CUPS interface with http://192.168.2.20:631.
When I click on the "printers" tab I get the following message:
403 Forbidden.
I can't access the printers from the laptop although the network itself is working ok.
What I am missing?
Thanks*
 
Old 12-15-2008, 03:04 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,962

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
You should edit cupsd.conf to allow printer administration for remote users. Check the "Allow from" and the "Listen" options and make sure you use the correct values.

Regards
 
1 members found this post helpful.
Old 12-17-2008, 01:17 PM   #3
DLHOMME
LQ Newbie
 
Registered: Dec 2005
Location: LÚvis, Qc, Canada
Distribution: Suse 10.2
Posts: 26

Original Poster
Rep: Reputation: 15
CUPS -403 Forbidden message

Thank you for the suggestion. Unfortunately, my problem persists.
Here is my cuspd.conf file.
Is there a problem withit?
Thanks again


LogLevel debug
SystemGroup sys root
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
DefaultAuthType Basic
<Location />
Allow From 127.0.0.1
Allow From 192.168.2.*
Allow From @LOCAL
# Allow shared printing and remote administration...
Order allow,deny
Allow all
</Location>
<Location /admin>
Encryption Required
# Allow remote administration...
Order allow,deny
Allow all
</Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
# Allow remote access to the configuration files...
Order allow,deny
Allow all
</Location>
<Policy default>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
<Location /printers>
Order Allow,Deny
</Location>
<Location /classes>
Order Allow,Deny
</Location>
 
Old 12-17-2008, 01:39 PM   #4
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 302
Blog Entries: 1

Rep: Reputation: 34
are you able to restart the service successfully with the above settings ?
 
Old 12-17-2008, 02:15 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by DLHOMME
<Location /printers>
Order Allow,Deny
</Location>
Change to:
Code:
<Location /printers>
  Order Allow,Deny
  Allow From 127.0.0.1
  Allow From 192.168.2.
</Location>
... and restart cups.
 
Old 12-17-2008, 05:11 PM   #6
DLHOMME
LQ Newbie
 
Registered: Dec 2005
Location: LÚvis, Qc, Canada
Distribution: Suse 10.2
Posts: 26

Original Poster
Rep: Reputation: 15
Smile CUPS - 403 Forbidden

Thanks ANOMIE, that did the trick. I can now access the CUPS printers on the server through the interface.
I set up two of the printers on my laptop and when trying the test page I get the following message:
"usr/lib64/cups/backend/http failed"
I'm still not out of the woods.
Thanks for any additional help.
 
Old 12-17-2008, 05:53 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
IMO, that is a different topic/thread (and not really related to your original "403 Forbidden" question).

In general, this is what I would do to troubleshoot that message (in this order):
  1. Set LogLevel debug (which you've already done). Try to print and then observe the latest entries in /var/log/cups/error_log. This should give some good clues.
  2. If that doesn't lend itself immediately to a fix, take the information you have got and search both google and LQ.
 
Old 08-27-2011, 05:58 PM   #8
festr
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 0
it is not "Allow From IP" but "Allow 0.0.0.0/0" for example. Restart CUPS and you are donw.

edit: it is wrong, Allow From IP is right syntax

Last edited by festr; 08-29-2011 at 05:32 AM.
 
Old 08-28-2011, 12:59 PM   #9
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
@festr: The official CUPS documentation disagrees with you.

http://www.cups.org/documentation.ph...upsd-conf.html

Whether or not "from" can be omitted, you dug up a thread from 2008 to argue about a technical detail that was already correct.
 
Old 08-29-2011, 05:31 AM   #10
festr
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 0
You are right, sorry to confuse this thread.
 
Old 09-09-2011, 10:27 AM   #11
ngwasuma
Member
 
Registered: Jan 2005
Distribution: Fedora11
Posts: 45

Rep: Reputation: 16
Don't kill yourself for nothing

don't open http://xx.xx.xx.xx:631 -- cups will spit a standard http error for accessing a resource that is not allowed (or in this case invalid).

Open http://xx.xx.xx.xx:631/admin/
 
Old 11-14-2014, 09:10 PM   #12
joloboff
LQ Newbie
 
Registered: Apr 2012
Posts: 6

Rep: Reputation: Disabled
CUPS Forbidden access

Hi
I have been a Ubuntu user for some time, but I switched to OpenSuse. The installation went fine. Then I wanted to install my printer. It is a wireless printer connected to the same router as my laptop.
My router is 192.168.3.1.
When I want to install the printer on CUPS I get "forbidden access", even though I am a sudo-er.
After reading the forum, I changed my configuration file to
<Location />
# Allow remote administration...
Order allow,deny
Allow From 127.0.0.1
Allow From 127.0.0.2
Allow From @LOCAL
Allow all
</Location>
<Location /admin>
# Allow remote administration...
Order allow,deny
Allow all
</Location>
<Location /admin/conf>
# Allow remote access to the configuration files...
Order allow,deny
Allow all
</Location>
<Location /printers>
Order allow,deny
Allow From 127.0.0.1
Allow From 127.0.0.2
Allow From 192.168.3
</Location>

But it did not change anything !!!

It dumps the following into the file /var/log/cups/error_log:

E [14/Nov/2014:10:10:45 +0800] cupsdAuthorize: pam_authenticate() returned 10 (User not known to the underlying authentication module)!
E [14/Nov/2014:10:10:48 +0800] Returning HTTP Forbidden for CUPS-Get-Devices (no URI) from localhost
E [14/Nov/2014:10:10:48 +0800] [CGI] CUPS-Get-Devices request failed with status 401: Forbidden
E [14/Nov/2014:10:14:29 +0800] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.
E [14/Nov/2014:10:15:53 +0800] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.
E [14/Nov/2014:10:19:24 +0800] Returning HTTP Forbidden for CUPS-Get-Devices (no URI) from localhost
E [14/Nov/2014:10:19:24 +0800] [CGI] CUPS-Get-Devices request failed with status 401: Forbidden

Then I tried to install the printer using the desktop config utility clicking in 'Printers'.
But it does not find my printer.
Please help !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting 403 forbidden message when try to access bugzilla on CENTOS server slasher_neo Linux - Newbie 1 07-24-2008 03:19 AM
403 forbidden message skullhunterph Linux - Server 3 04-02-2007 08:52 AM
Apache - "403 forbidden" message on any DIR below DocumentRoot stevod333 Linux - Software 12 06-12-2006 05:58 AM
403 forbidden Flawless Slackware 4 03-04-2003 08:24 AM


All times are GMT -5. The time now is 09:50 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration