[gutsy] Can't print with Canon LBP-660 due to AppArmor

Bug #163148 reported by Jarno Suni on 2007-11-16
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)

Bug Description

I installed driver lbp660-0.3.1 from http://www.boichat.ch/nicolas/lbp660/
There is more information in http://ubuntuforums.org/showthread.php?t=610734

Some people have reported they succeeded in printing in 7.04 by the same driver, though.

Jarno Suni (jarnos) wrote :

mirkuma at ubuntuforums.org have provided some error message data:

renbag (renbag) wrote :

Try to remove the apparmor package and see if the 'Unauthorized' error disappears.

Jarno Suni (jarnos) wrote :

Thank you Renzo Bagnati! Printing works in Gutsy after removing the apparmor package. I don't know, if the package is needed for something else, though.

renbag (renbag) wrote :

From apparmor man page:
"AppArmor is a kernel enhancement to confine programs to a limited set of resources. AppArmor’s unique security model is to bind access control attributes to programs rather than to users."

You may want to reinstall the package (and apparmor-utils) and find the way to configure it to allow printing with the lbp660 driver. The driver probably needs to write to some directory or device to which is not allowed by apparmor's default settings.
Read the man page, it has instructions to put the apparmor application in 'enforcement' or 'complain' mode and to find the appropriate error messages.
In the meanwhile, when you need to print, you can stop the apparmor service with:
sudo /etc/init.d/apparmor stop
and restart it with:
sudo /etc/init.d/apparmor start

Jarno Suni (jarnos) wrote :

Thanks for hints.

'The driver must run SUID "root", so the printer is not suitable for security-critical systems.'
quoted from http://openprinting.org/show_driver.cgi?driver=lbp660

So maybe it is not possible to use the AppArmor's security model with the driver?
BTW do you happen to know, how AppArmor is set up for different programs by default in Gutsy? The existense of AppArmor security system in Gutsy was new to me.

renbag (renbag) wrote :

apparmor configurations are placed in /etc/apparmor and /etc/apparmor.d. In particular for CUPS look at the file /etc/apparmor.d/usr.sbin.cupsd.
I don't own a canon printer, so I cannot help more than this.

Jarno Suni (jarnos) wrote :

Renzo Bagnati, thanks for your help. The idea of limiting resources application-wise is appealing and I would like to see it better introduced to ubuntu users.

Daniel T Chen (crimsun) on 2008-11-15
Changed in cupsys:
importance: Undecided → Low
ditta (brigitte-dauth) wrote :

I stopped apparmor in 8.10 but I still can't print. What was the last version it worked? And how can I downgrade to this?

Changed in cupsys:
status: New → Confirmed

Gutsy is no longer supported.
Do you still need to disable apparmor for this printer driver in Hardy or newer?

Changed in cupsys (Ubuntu):
status: Confirmed → Incomplete

For the original bug reporter the LBP 660 worked after disabling AppArmor in Ubuntu Gutsy, so you probably have a different problem.
I would suggest you to file a support question in the answer tracker: https://answers.launchpad.net/ubuntu/+source/cups

We are closing this bug report, feel free to reopen if you still have this problem in Hardy or newer.

Changed in cupsys (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers