I’m having problems with a network printer installed in my work. It’s a HP LJ M5035 and I installed it using hplip.
The printer is well installed because I can see all its properties (remaining ink, paper, status, etc). But, If I try to print any file I get a “Unable to open print file: Permission denied” message in the cups page (http://localhost:631/jobs/). Also I’m getting an almost constant client-error-not-found message in the /var/log/cups/error_log file.
I read somewhere that this could be a wrong set of permissions on the backends, but until now, I don’t know how to fix it.
Does anyone have some suggestion?
Thanks for your answer.
Best regards.
***Some relevant information: ***
The /var/log/cups/error_log when I try to print something -> [Bash] E [01/Jul/2013:14:49:03 +0200] [cups-polld 130.120.226.13:631] CUPS-Get-Printers - Pastebin.com](http://pastebin.com/3E38d9Li)
Your cups is trying to connect to 130.120.226.13 and fails. Are you sure that’s the correct address of your printer?
FYI: That is a public IP address (although not reachable by me); if the printer is in your LAN it should have some private address like 10.x.y.z, 172.l.m.n or 192.168.a.b I guess…
You could at least tell if it is true that the printer is at your work (as you told), but your system is not. When that is true (your system being at your home for example), then it is rather logical that your work has some firewall in place that prevents systems from outside do roam around on your work’s network. And that will of course include printing from everybody on the world to your work’s printer. Isn’t that very logical?
When you want to print over the internet to a printer in your work’s network, you must contact the network manager there. Maybe he will allow your system.
Sorry my bad. I’m in my work place and the printer is connected via ethernet. I will try to talk with the administrator, but for me there is some misconfiguration somewhere in my machine that doesn’t allow print.
When I installed 12.3 for the first time I could print without any problem.
mikesol wrote:
> Sorry my bad. I’m in my work place and the printer is connected via
> ethernet. I will try to talk with the administrator, but for me there is
> some misconfiguration somewhere in my machine that doesn’t allow print.
>
> When I installed 12.3 for the first time I could print without any
> problem.
It seems quite likely there is some misconfiguration on your machine,
but it could also be a problem in the network.
I don’t know enough about CUPS to diagnose accurately using it. So I
would ask whether you have tried to use YaST to diagnose it?
Or from the command line, use telnet to try to connect to the
appropriate port and see what error occurs.
On 2013-07-01 18:21, Dave Howorth wrote:
> mikesol wrote:
>> Sorry my bad. I’m in my work place and the printer is connected via
>> ethernet. I will try to talk with the administrator, but for me there is
>> some misconfiguration somewhere in my machine that doesn’t allow print.
>>
>> When I installed 12.3 for the first time I could print without any
>> problem.
>
> It seems quite likely there is some misconfiguration on your machine,
> but it could also be a problem in the network.
It is an HP printer connected on a real Internet address, so, assuming
the network guys there know their job, it will be heavily protected
behind a good firewall. And very probably they change things from time
to time.
I would perhaps try a traceroute on the port used by the printer (9100?).
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
If I understood correctly, you wanted that I did something like this:
# traceroute 130.120.226.13
traceroute to 130.120.226.13 (130.120.226.13), 30 hops max, 40 byte packets using UDP
1 perec.ups-tlse.fr (130.120.226.13) 1.105 ms 1.147 ms 1.516 ms
On the other side, I tried to print a test page using Yast and I got this message:
Seeing your logging with the error above, I tend to see it as a local problem instead of network problem. Maybe we were a bit walking the wrong p[ath because of the unusula public IP address of the printer (which btw need [b]not te be reachable on the Internet; when you are “owner” of a public IP address range, you can use that on an internal network when you think fit).
Normaly with a permission poblem, we ask for an ls -l of the file and check who is the owner of the process that tries to acccess the file.
Maybe we can try a print from the command line:
lp -d <destination> <file>
Where <destination> should be replaced by the printer name and <file> can be a simple text file with a few ASCII lines.
On 2013-07-02 11:36, mikesol wrote:
>
> robin_listas;2568807 Wrote:
>>
>> I would perhaps try a traceroute on the port used by the printer
>> (9100?).
>>
>
> If I understood correctly, you wanted that I did something like this:
>
“On the port used by the printer” - ie, using “-p” - (see the man).
well, that’s a different error. The rest would be in the error_log file.
If not enough, increase verbosity, to find out which file has the
permission denied.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
On 2013-07-02 12:06, hcvv wrote:
>
> Seeing your logging with the error above, I tend to see it as a local
> problem instead of network problem. Maybe we were a bit walking the
> wrong path because of the unusula public IP address of the printer
> (which btw need not te be reachable on the Internet; when you are
> “owner” of a public IP address range, you can use that on an internal
> network when you think fit).
Provided you have routing tables that handle those packets internally
> Normaly with a permission poblem, we ask for an ls -l of the file and
> check who is the owner of the process that tries to acccess the file.
I saw a thread yesterday with a similar permission denied message. But I
can’t remember which thread
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
traceroute -p 9100 130.120.226.13
traceroute to 130.120.226.13 (130.120.226.13), 30 hops max, 40 byte packets using UDP
1 perec.ups-tlse.fr (130.120.226.13) 1.086 ms 1.140 ms 1.734 ms
This is my configuration in /etc/cups/cupsd.conf (with LogLevel debug )
cat /etc/cups/cupsd.conf
LogLevel debug
SystemGroup sys root lp
# Allow remote access
#Port 631
Listen *:631
Listen localhost:631
Listen /var/run/cups/cups.sock
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS
BrowseAddress @LOCAL
DefaultAuthType Basic
WebInterface Yes
<Location />
Allow @IF(eth0)
Allow @LOCAL
Allow all
Order allow,deny
Allow 127.0.0.2
</Location>
<Location /admin>
</Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
</Location>
<Policy default>
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
<Limit Create-Job Print-Job Print-URI Validate-Job>
Order deny,allow
</Limit>
<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 Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
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 CUPS-Get-Devices>
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 Cancel-Jobs 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>
<Policy authenticated>
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Default
Order deny,allow
</Limit>
<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 Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
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 Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
<Policy allowallforanybody>
<Limit All>
Order deny,allow
Allow from all
</Limit>
</Policy>
DefaultPolicy default
FileDevice yes
# 2013-07-02,10:43:07 modify_cupsd_conf Listen localhost
# 2013-07-02,10:43:48 modify_cupsd_conf Allow @IF(eth0) @LOCAL all
# 2013-07-02,10:43:48 modify_cupsd_conf BrowseAddress @LOCAL
# 2013-07-02,10:43:49 modify_cupsd_conf Browsing On
# 2013-07-02,10:43:49 modify_cupsd_conf Listen all
Spool Directory Permission ErrorsLook for this message in your error log:
E [timestamp] [Job n] unable to open print file - : Permission denied
CUPS normally runs its filters as the pseudo-user lp and the group sys, so this user must have access to the spool directory /var/spool/cups in order to access intermediate data. When fixing the permissions, look for these problems:
Check all component directories of /var/spool/cups. Can the lp user access each of them?
Make sure that you have the lp user in your /etc/passwd file.
Verify that lp belongs to the sys group. (Remember that you can change the pseudo-user and group with the User and Group parameters of cupsd.conf.)
Yes, according to your listing the cups filters can’t access the spool directory if they are not running as root.
I guess that I have to make something like
**chown -R lp /var/spool/cups/**
Am I right?
I guess that would work (if they get run as user lp), but normally the directory and the files are owned by root:lp (you would change them to lp:nobody).
So I think you better should do:
chgrp -R lp /var/spool/cups/
If that doesn’t work, you can still try your chown line as well.
On 2013-07-02 16:06, mikesol wrote:
>
> wolfi323;2568920 Wrote:
>> Maybe this helps? From ‘12.5 CUPS :: Chapter 12: Printing :: How linux
>> works :: Linux systems :: eTutorials.org’ (http://tinyurl.com/ck6xjto)
>>
>
> Thanks wolfi323 for the explanation. Maybe this is the problem. I have
> this:
>