CUPS ACL problem

This forum is for all other ARMv5 devices

CUPS ACL problem

Postby snpy » Sat Dec 17, 2011 3:49 am

Hi,

I just installed alarm on a PogoPlug Pro (black one) and want to say thanks for all the great work. I'm very new to alarm so I'm still feeling my way around... but I've used slack, kanotix, sidux, debian, ubuntu, and also redhat at work, etc. Very cool.

I'm trying to setup an old and cheap usb ML-2010 printer to it so that it can be used on the home network. lsusb showed that it is detected in the PogoPlug Pro. This printer uses the splix driver, so I installed it with pacman (which I have successfully set up in ubuntu). I followed the wiki page (CUPS with Apple AirPrint, and noticed some differences) to get webmin and cups started:

Step 4: /etc/rc.d/cups start
==> /etc/rc.d/cupsd start

Step 12: DeviceURI usb:/dev/usblp0
==> usb:/dev/usb/lp0

Step 13: edit /etc/cups/cupsd.conf

Listen localhost:631
==> Listen *:631

#Restrict access to the server to your local network:
<Location />
Order allow,deny
allow 192.168.0.1 192.168.0.* 192.168.0.***
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
allow 192.168.0.*
</Location>

I wasn't able to access CUPS from another machine, so I changed all the allow lines to
allow @LOCAL


to get it to work.

However, after all the setup, it does not print a test page. The following errors are found in /var/log/cups/error_log

D [16/Dec/2011:20:57:17 -0600] Discarding unused server-stopped event...
D [16/Dec/2011:20:57:17 -0600] cupsdDeregisterPrinter(p=0x2a086840(ML-2010-pogo), removeit=1)
I [16/Dec/2011:20:57:17 -0600] Saving job.cache...
E [16/Dec/2011:20:57:21 -0600] Unable to set ACLs on root certificate "/var/run/cups/certs/0" - Operation not supported
E [16/Dec/2011:20:59:35 -0600] [Job 12] Stopping job because the scheduler could not open the output file.
E [16/Dec/2011:21:04:38 -0600] [Job 12] Stopping unresponsive job!

I tried googling and saw lots of references about ACLs but no definite fix. Any one have any idea what I missed and what I need to do?

BTW, I also tried to set it up using lynx on localhost:631, but it doesn't list the printer as I have seen on the other ubuntu machine.

Thanks a lot.
snpy
 
Posts: 5
Joined: Thu Dec 15, 2011 7:12 pm

Re: CUPS ACL problem

Postby pepedog » Sat Dec 17, 2011 10:42 am

Not this
allow 192.168.0.1 192.168.0.* 192.168.0.***
Just this
allow 192.168.0.*

Who makes the ml 2010? Hope driver doesn't have x86 binary blobs in
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: CUPS ACL problem

Postby Geoff » Sat Dec 17, 2011 5:41 pm

$this->bbcode_second_pass_quote('snpy', 'I') tried googling and saw lots of references about ACLs but no definite fix. Any one have any idea what I missed and what I need to do?

I have cups working fine, both local and remote. I get the same messages about ACLs, but that doesn't seem to cause any problems for me. I am guessing that the old kernel and/or filesystem modules that we are using do not support access control lists, extended attributes, etc., as I get similar warning/error messages from other packages.
$this->bbcode_second_pass_quote('snpy', 'B')TW, I also tried to set it up using lynx on localhost:631, but it doesn't list the printer as I have seen on the other ubuntu machine.

I installed the hplip package, and I find that it works just as well as it does under Ubuntu, and provides PPD configuration files for thousands of printers including yours. I would be surprised if you need a separate driver package. I find that the easiest way to configure a new printer is to use the Ubuntu printer configuration tool, connecting remotely to the daemon running on the pogoplug (using IPP port 631). Having set up the remote printer, I then create a (virtual) local printer on the Ubuntu system that communicates with the remote printer using IPP. It should be possible to access the remote printer using Samba, but I haven't worked out all the kinks in that process. Here is my cupsd.conf, with names and IP addresses changed to protect the innocent.

$this->bbcode_second_pass_code('', '#
# "$Id: cupsd.conf.in 9407 2010-12-09 21:24:51Z mike $"
#
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
# complete description of this file.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn

# Administrator user group...
SystemGroup sys root snpy <== your admin group(s)


# Listen for connections from the local machine and over the LAN.
Listen localhost:631
Listen 192.168.0.123:631 <== your PogoPlug IP address
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow from @LOCAL
BrowseAllow from 192.168.0.0/24 <== your LAN subnet/mask
BrowseLocalProtocols CUPS dnssd
BrowseAddress @LOCAL
BrowseInterval 0
HostNameLookups On
ServerName alarm.local <== your hostname as in /etc/hosts
ServerAlias alarm <== your host aliases (if any) as in /etc/hosts

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

# Web interface setting...
WebInterface Yes

# Restrict access to the server...
<Location />
Order allow,deny
Allow from @LOCAL
Allow from 192.168.0.0/24 <== your LAN subnet/mask
</Location>

# Restrict access to the admin pages...
<Location /admin>
Encryption Required
Order allow,deny
Allow from @LOCAL
Allow from 192.168.0.0/24 <== your LAN subnet/mask
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow from @LOCAL
Allow from 192.168.0.0/24 <== your LAN subnet/mask
</Location>

# Set the default printer/job policies...
<Policy default>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

# Job-related operations must be done by the owner or an administrator...
<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>

# All administration operations require an administrator to authenticate...
<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>

# All printer operations require a printer operator to authenticate...
<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>

# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

<Limit All>
Order deny,allow
</Limit>
</Policy>

# Set the authenticated printer/job policies...
<Policy authenticated>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

# Job-related operations must be done by the owner or an administrator...
<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>

# All administration operations require an administrator to authenticate...
<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>

# All printer operations require a printer operator to authenticate...
<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>

# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

<Limit All>
Order deny,allow
</Limit>
</Policy>

#
# End of "$Id: cupsd.conf.in 9407 2010-12-09 21:24:51Z mike $".
#
')
Last edited by Geoff on Sun Dec 18, 2011 1:17 am, edited 2 times in total.
Geoff
 
Posts: 231
Joined: Wed Mar 09, 2011 5:14 pm

Re: CUPS ACL problem

Postby snpy » Sat Dec 17, 2011 6:15 pm

To pepedog: the printer is by Samsung. I never thought about the x86 issue, but I also had problem installing it on an old iBook (PowerPC), which prints only black lines or blank pages. But splix is an open source driver, so I'm not leaning towards that as a problem.

To Geoff: Before I installed the splix package in alarm, the printer driver was not listed when I tried to install, that's why I went back to splix. I also used the splix driver on my other ubuntu machine. (the splix driver was actually supposed to provide a better resolution than default). I will try your method and config and see if it works.


Thanks a lot.
snpy
 
Posts: 5
Joined: Thu Dec 15, 2011 7:12 pm

Re: [ALMOST RESOLVED] CUPS ACL problem

Postby snpy » Sat Dec 24, 2011 2:45 am

OK, using the suggestions from Geoff and after trying it many times (on several days), I am almost there. It works if I reboot the machine (despite a couple of error messages about splix), but if I were to turn off the printer and turn it back again without rebooting, I cannot print the test page. It gives the error:

[Job 94] Stopping job because the scheduler could not open the output file.

It still refused to print even if I restart cups with:
/etc/rc.d/cupsd restart

So, I first suspected the usb ports might have changed, but both times, it was connected to
[root@alarm ~]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 003: ID 04e8:326c Samsung Electronics Co., Ltd ML-2010P Mono Laser Printer
Bus 001 Device 004: ID 0325:ac02 OCZ Technology Inc ATV Turbo / Rally2 Dual Channel USB 2.0 Flash Drive

I also checked the permissions on the /dev/usb/lp0 and /dev/usb/001/003 and they were the same.

So, I turned on debug messages in cupsd.conf, restarted cupsd, printed a test page and diff'ed the error_log files and noticed that the first difference was at:

(from failed job)
< [Job 94] Started filter /usr/lib/cups/filter/bannertops (PID 1213)
< [Job 94] Started filter /usr/lib/cups/filter/pstops (PID 1214)
< [Job 94] Started filter /usr/lib/cups/filter/gstoraster (PID 1215)

(from successful job)
> [Job 96] Started filter /usr/lib/cups/filter/bannertops (PID 1006)
> [Job 96] Started filter /usr/lib/cups/filter/pstops (PID 1007)
> [Job 96] Started filter /usr/lib/cups/filter/gstoraster (PID 1008)
> [Job 96] Started filter /usr/lib/cups/filter/rastertoqpdl (PID 1009)

So, it failed to call rastertoqpdl when it failed to print, but there is no indication as to why. The permissions have not changed in the two cases.
-rwxr-xr-x 1 root root 22616 Sep 1 22:28 /usr/lib/cups/filter/gstoraster

Anyone knows why cups is failing to call the script? And if any one has any idea how to deal with this problem.

Thanks a lot.
snpy
 
Posts: 5
Joined: Thu Dec 15, 2011 7:12 pm

Re: CUPS ACL problem

Postby Geoff » Mon Dec 26, 2011 12:50 am

When I set up my printer this way, I had to try a couple of different PPD configuration files (as provided by hplip) before I got it to work properly. Some configurations work better than others. I think there are two available for your printer. Perhaps one of these tries to use utilities (rastertoqpdl) that you don't have, so maybe it's worth trying out the other one at this point.
Geoff
 
Posts: 231
Joined: Wed Mar 09, 2011 5:14 pm

Re: CUPS ACL problem

Postby snpy » Mon Jan 02, 2012 11:32 pm

rastertoqpdl should be there since it gets printed when rebooted. I tried hplip, but didn't see any driver for the printer when modifying the printer. So, I tried various gutenprint drivers, but still nothing. openprinting.org shows only splix and gdi, but I'm not sure which package provides that. I also tried to remove the usblp module with rmmod, but it hung.

Not sure what else I can try. Thanks.
snpy
 
Posts: 5
Joined: Thu Dec 15, 2011 7:12 pm

Re: CUPS ACL problem

Postby Geoff » Tue Jan 03, 2012 5:10 am

I just bought and upgraded a Pogo Pro as a Christmas present for my sister. When I tried to configure her printers on it, I ran into a similar problem. Her old HP LaserJet 1020 requires firmware to be loaded every time it is switched on. I read here that it's possible to write udev rules for this. It sounds like that might be what you need too. On the other hand, I didn't even get so far as finding a driver, which is supposed to exist in foo2zjs (from AUR).
Last edited by Geoff on Fri Jan 06, 2012 6:34 am, edited 1 time in total.
Geoff
 
Posts: 231
Joined: Wed Mar 09, 2011 5:14 pm

Re: CUPS ACL problem

Postby snpy » Thu Jan 05, 2012 7:23 pm

I should say, I tried many things after googling, but still have the same symptoms.
I've tried blacklisting usblp, didn't work.
Tried rmmod -f, hung every time.
Tried turning off printer for a long time (>30mins) before turning it back on, sometimes works, mostly did not... probably related to module still not being unloaded.
Tried installing cups-usblp from AUR, but got lots of missing dependencies. Fixed one at a time but it finally just fails to compile with no error message... Tried to turn on error messages for compilation but still gave me nothing, so I don't know what is the problem (googling shows there is a bug report on this).
Haven't tried udev yet, since I'm not familiar with it. Will have to read up on the manpage on this.

Thanks.
snpy
 
Posts: 5
Joined: Thu Dec 15, 2011 7:12 pm


Return to Community Supported

Who is online

Users browsing this forum: No registered users and 26 guests