Linux printing technician providing live chat help

Joe B.

Reviewed for technical accuracy

Specialities: Ubuntu, Debian, Fedora, Arch, CUPS/IPP, Samba printing, Networking, Security (SELinux/AppArmor)

CUPS 403 Forbidden on Ubuntu/Debian/Fedora/Arch — enable web admin, fix cupsd.conf, allow port 631

Technician avatar Technician
Hey! We’ll clear your CUPS web interface 403 Forbidden. Tell me your distro (Ubuntu/Debian/Fedora/RHEL/Arch), whether you access http://localhost:631/admin or from another PC, and if the system uses SELinux or AppArmor. We’ll check cupsd.conf, lpadmin group, and firewall for port 631 (IPP).
Customer
Ubuntu 22.04 server. Opening http://localhost:631/admin shows 403 Forbidden. I’m in sudoers, but web admin blocks me. Need to add a network printer and enable remote CUPS administration.
Technician avatar Technician
Got it. Common causes of CUPS 403 are:
• WebInterface No in /etc/cups/cupsd.conf disables the GUI.
• Your user isn’t in the lpadmin group, so AdminPolicy denies access.
• Require user @SYSTEM + missing auth directives for /admin.
• Firewall blocks IPP/631 or Listen is set to localhost only when you need remote access.
• SELinux/AppArmor policies prevent cupsd from binding or authenticating.
Plan: enable web UI, add you to lpadmin, fix cupsd.conf Location /admin rules, open port 631, then restart CUPS.
Customer
How do I enable the CUPS web admin on Ubuntu and stop the 403?
Technician avatar Technician
Fix CUPS 403 — Ubuntu/Debian:
1) Enable GUI: edit /etc/cups/cupsd.conf and ensure WebInterface Yes.
2) Allow admin: in the <Location /admin> block, include:
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow localhost
If you need remote admin from your LAN, add Allow 192.168.0.0/16 (match your subnet) and set Listen 0.0.0.0:631 or Port 631.
3) Add your account to the lpadmin group: sudo usermod -aG lpadmin $USER → re‑login.
4) Open firewall for IPP: sudo ufw allow 631/tcp.
5) Restart CUPS: sudo systemctl restart cups. Then browse to http://localhost:631/admin and authenticate.
Customer
What about Fedora/RHEL with SELinux? The page also returns 403.
Technician avatar Technician
Fedora/RHEL/Alma — SELinux:
• Install CUPS and enable service: sudo dnf install cups → sudo systemctl enable --now cups.
• Permit the web UI and remote admin in cupsd.conf as above; set WebInterface Yes, Listen 0.0.0.0:631 if remote access is required.
• Open firewall: sudo firewall-cmd --add-service=ipp --permanent && sudo firewall-cmd --reload.
• Check SELinux booleans: sudo getsebool cups_execmem, and set setsebool -P cups_execmem 1 only if AVC logs demand it (rare). For remote access, setsebool -P cups_enable_network_server 1.
• Inspect denials: sudo ausearch -m avc -ts recent or sudo journalctl -t setroubleshoot and apply suggested fixes.
Customer
I’m still getting 403 when authenticating. It asks for a password, then denies.
Technician avatar Technician
That’s usually an authorization mismatch:
• Confirm your user is in lpadmin: groups $USER. If you just added it, log out/in or newgrp lpadmin.
• Ensure DefaultAuthType Basic or AuthType Default is configured; avoid Negotiate unless Kerberos is set up.
• For rootless or LDAP users, consider adding SystemGroup sys root lpadmin in cupsd.conf matching your distro’s groups.
• Clear cached creds: different browsers can cache wrong auth; test with curl -u user:pass http://localhost:631/admin to confirm.
Customer
Can I enable remote CUPS administration securely for just my LAN?
Technician avatar Technician
Yes — use restricted Location rules and HTTPS:
1) In cupsd.conf, set Listen 0.0.0.0:631 and in both <Location /> and <Location /admin> add:
Order allow,deny
Allow 127.0.0.1
Allow 192.168.1.0/24  # your LAN

2) Enable encryption: DefaultEncryption Required or use https://server:631 (CUPS auto‑generates certs).
3) Keep lpadmin membership minimal and rotate passwords. Consider SSH tunnel (ssh -L 631:localhost:631) instead of exposing port 631.
Customer
What about Arch Linux? Is the fix the same?
Technician avatar Technician
Arch Linux:
• sudo pacman -S cups → sudo systemctl enable --now cups.
• Edit /etc/cups/cupsd.conf → WebInterface Yes, set Listen/Port 631, and Allow your LAN if needed.
• Add user to lp and lpadmin groups: sudo usermod -aG lp,lpadmin $USER.
• Open firewall for IPP using your firewall tooling (e.g., ufw, iptables, firewalld).
Customer
Okay, followed the steps and I’m in. How do I add printers via IPP and share to Windows clients?
Technician avatar Technician
In the web UI go to Administration → Add Printer, choose IPP or JetDirect, and install drivers (PPD) if required. To share to Windows:
• In CUPS set Share printers connected to this system and Browsing On.
• On Windows, add printer via IPP: http://server:631/printers/queue. Or expose via Samba if needed.
Customer
Great — 403 Forbidden is gone and admin works. Thanks!
Technician avatar Technician
Summary: To fix Linux CUPS web interface 403 Forbidden, set WebInterface Yes, add your user to lpadmin, open port 631, and adjust <Location /admin> rules (Allow LAN + Require user @SYSTEM). For Fedora/RHEL, confirm SELinux & firewall allow IPP. Use HTTPS or SSH tunneling for secure remote CUPS administration. Need help tailoring cupsd.conf? Open the chat.

Quick answer: the accepted fix

Accepted fix when you see CUPS 403 Forbidden on localhost:631: enable WebInterface Yes, add user to lpadmin, permit access in cupsd.conf (Allow localhost and your LAN as needed), open firewall port 631, then restart CUPS. On SELinux systems, set the required booleans for network server access.


CUPS web interface disabled by default — enable and restart

If WebInterface No is set, change it to WebInterface Yes in /etc/cups/cupsd.conf and run sudo systemctl restart cups. Then visit http://localhost:631/admin.

Remote CUPS administration (secure)

For remote access, set Listen 0.0.0.0:631, add Allow 192.168.1.0/24 in <Location /> and <Location /admin>, require @SYSTEM, and use https://. Limit exposure with a VPN or SSH tunnel.

CUPS 403 forbidden — troubleshooting tips

Most 403 errors are caused by lpadmin membership, cupsd.conf rules, or firewall/SELinux.

Quick path: verify WebInterface → check lpadmin group → review <Location /admin> access rules → open IPP/631 → restart CUPS → test with curl. Use journalctl -u cups for logs and ausearch for SELinux denials.

Disclaimer: This information is AI-generated and intended for general guidance only. For advice specific to your environment, please consult a verified expert on Whizz-Tech before making decisions.


Getting Started Is Easy

Ask for help, 24/7

Members enjoy round-the-clock access to 12,000+ verified Experts, including Linux admins and printing specialists.

Expert will respond in minutes

We match you with an Expert who specializes in CUPS, IPP, and enterprise printing security.

Save time & money

No guesswork or downtime. Get compliant CUPS configs and secure remote admin.

FAQ

Why does CUPS show 403 Forbidden on /admin?

Usually because WebInterface is disabled, your user isn’t in lpadmin, or <Location /admin> blocks your host. Fix cupsd.conf, add yourself to lpadmin, and restart CUPS.

How do I enable remote CUPS admin access safely?

Allow only your LAN in Allow directives, require @SYSTEM, enable HTTPS, and limit the lpadmin group. Consider SSH tunneling instead of opening 631 to the world.

Firewall or SELinux is blocking CUPS — what now?

Open port 631 (IPP) on your firewall. On Fedora/RHEL, set necessary SELinux booleans (e.g., cups_enable_network_server) and follow setroubleshootd guidance for any AVC denials.

Can I manage CUPS without the web UI?

Yes. Use lpadmin, lpstat, and lpoptions CLI tools or edit PPDs directly. The web UI is optional once access policies are correct.

How do I reset cupsd.conf to defaults?

Backup then reinstall package defaults (e.g., sudo apt --reinstall install cups) or copy from /usr/share/cups/cupsd.conf.default if your distro provides it.

Common CUPS 403 problems and quick fixes
SymptomLikely causeQuick fix
403 on /admin Web UI disabled; user not in lpadmin Set WebInterface Yes; add user to lpadmin
403 after auth Require rules block host; wrong auth type Allow localhost/LAN; set AuthType Default and Require user @SYSTEM
Cannot connect remotely Listen only on localhost; firewall closed Set Listen 0.0.0.0:631; open port 631
Fedora/RHEL only SELinux denial Review AVC logs; set cups_enable_network_server boolean

Step‑by‑step (Linux)

  1. Edit /etc/cups/cupsd.conf → WebInterface Yes, set access rules for / and /admin.
  2. Add your account to lpadmin and re‑login.
  3. Open firewall for IPP/631 and, if needed, set Listen 0.0.0.0:631.
  4. Restart service: sudo systemctl restart cups and test https://localhost:631.

Sources

Matt Verified Icon
Matt ● replies in < 1 min
Technician Expert
⭐⭐⭐⭐⭐ Trusted by 27,000+ customers
Avatar
Alex · Expert's Assistant