Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Servers
Reload this Page CUPS 403 Forbidden error
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Servers Anything server related, Apache, MySQL, Samba, server security, sendmail, exim, etc

Reply
 
Thread Tools Display Modes
Old 04-25-2008   #1 (permalink)
Just Joined!
 
Join Date: Apr 2008
Posts: 3
Question CUPS 403 Forbidden error

No matter what I change in my cups configuration file, it just won't work. Every time I try to access the administration pages or add a new printer, I get a 403 forbidden error.

Please look at my current config file and tell me where I'm going wrong.
Be gentle, I'm fairly new to Linux.

Code:
LogLevel info
SystemGroup sys root
#Allow remote access
Port 631
Listen /var/run/cups/cups.sock
Listen 127.0.0.1:631
Listen 192.168.1.100:631
Listen 192.168.1.101:631
Listen 192.168.1.102:631
#Enable printer sharing and shared printers.
ServerName 192.168.1.151
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress 192.168.1.255
DefaultAuthType Basic
<Location />
  # Allow shared printing...
  Order allow,deny
  Allow From 192.168.1.*
  Allow From 127.0.0.1
  Allow From localhost.localdomain
  Allow all
</Location>
<Location /admin>
  Encryption Required
  # Restrict access to the admin pages...
  Order allow,deny
  Allow localhost
</Location>
<Location /admin/conf>
  AuthType Default
  #Require user @SYSTEM
  # Restrict access to the configuration files...
  Order allow,deny
  Allow localhost
</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
    Allow localhost
  </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 Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
bonaventure is offline   Reply With Quote
Old 04-25-2008   #2 (permalink)
Trusted Penguin
 
daark.child's Avatar
 
Join Date: Apr 2006
Location: South Yorks, UK
Posts: 3,532
Are you trying to access the admin page from a different machine one the same network?
daark.child is offline   Reply With Quote
Old 04-25-2008   #3 (permalink)
Just Joined!
 
Join Date: Apr 2008
Posts: 3
same machine and on network

I've tried both. However, I only have three machines, so it's no big deal to add printers from my linux box. I get the 403 permission error when I go to port 631/admin from the server itself.

Part of my problem, I suspect, is that I may not have SAMBA configured properly. This is a bit overwhelming.
bonaventure is offline   Reply With Quote
Old 04-25-2008   #4 (permalink)
Trusted Penguin
 
daark.child's Avatar
 
Join Date: Apr 2006
Location: South Yorks, UK
Posts: 3,532
I doubt that the problem is related to samba, but maybe the way you have configured access permissions in cupsd.conf. This is part of my cupsd.conf
Code:
# Only listen for connections from the local machine.
#Listen localhost:631
Listen 192.168.1.126:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow localhost
  Allow @LOCAL
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow @LOCAL
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow @LOCAL
</Location>
...
I configured cups to only listen to the ip address allocated to the server and allowed machines on the local network to browse the printers, access the server, admin pages and configuration files. Hope you can use this as a guide to fix your problem.
daark.child is offline   Reply With Quote
Old 04-25-2008   #5 (permalink)
Just Joined!
 
Join Date: Apr 2008
Posts: 3
Smile getting closer

Thank you for your prompt response. I'm getting closer. I was missing info in the admin section (as you suggested).
Now there appears to be some confusion with my certificate. when I navigate to part 631 it wants to take me to localhost.localdomain instead of my ip address. I get a security certificate warning that I'm trying to access an IP address but the certificate is for localhost.localdomain. I then get an error or I land on my default apache page.
I'll keep playing. Any ideas?
Thanks again for the help.
bonaventure is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 08:47 PM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0