Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-22-2008, 08:17 AM
|
#1
|
|
LQ Newbie
Registered: May 2004
Location: Rostov-on-Don, Russia
Posts: 16
Rep:
|
CUPS is broken in Ubuntu Gutsy after update?
Hello,
I was able to add and use printer in Gutsy, but recently when i tried to print, noticed that my job was held. After trying to fix it, I removed printer, and was not able to add a new both via web console and gnome program. In logs I found:
Code:
E [07/Apr/2008:22:02:21 +0000] [CGI] Unable to execute "/usr/lib/cups/backend/hal" - Permission denied
E [07/Apr/2008:22:02:21 +0000] [CGI] Unable to execute "/usr/lib/cups/backend/cups-pdf" - Permission denied
E [07/Apr/2008:22:02:21 +0000] [CGI] Unable to execute "/usr/lib/cups/backend/beh" - Permission denied
E [07/Apr/2008:22:02:21 +0000] [CGI] Unable to execute "/usr/lib/cups/backend/canon" - Permission denied
E [07/Apr/2008:22:02:21 +0000] [CGI] Unable to execute "/usr/lib/cups/backend/bluetooth" - Permission denied
E [07/Apr/2008:22:12:01 +0000] PID 2502 (/usr/lib/cups/cgi-bin/printers.cgi) stopped with status 22!
E [07/Apr/2008:22:12:04 +0000] PID 2506 (/usr/lib/cups/cgi-bin/admin.cgi) stopped with status 22!
E [07/Apr/2008:22:13:09 +0000] PID 2511 (/usr/lib/cups/cgi-bin/admin.cgi) stopped with status 22!
And then with DEBUG2 level:
Code:
d [08/Apr/2008:00:07:05 +0000] cupsdStartProcess("/usr/lib/cups/daemon/cups-driverd", 0x7fffdd2cb750, 0x7fffdd2cb390, -1, 10, 6)
D [08/Apr/2008:00:07:05 +0000] [CGI] /usr/lib/cups/daemon/cups-driverd started - PID = 6574
I [08/Apr/2008:00:07:05 +0000] Started "/usr/lib/cups/daemon/cups-driverd" (pid=6574)
D [08/Apr/2008:00:07:05 +0000] cupsdSendCommand: 7 file=8
d [08/Apr/2008:00:07:05 +0000] cupsdAddSelect: fd=8, read_cb=0x40f200, write_cb=(nil), data=0x6aac60
d [08/Apr/2008:00:07:05 +0000] process_children()
E [08/Apr/2008:00:07:05 +0000] PID 6574 (/usr/lib/cups/daemon/cups-driverd) stopped with status 22!
d [08/Apr/2008:00:07:05 +0000] cupsdDoSelect: polling 5 fds for 1 seconds...
d [08/Apr/2008:00:07:05 +0000] cupsdDoSelect: epoll() returned 2...
d [08/Apr/2008:00:07:05 +0000] cupsdDoSelect: Read on fd 5...
D [08/Apr/2008:00:07:05 +0000] [CGI] /usr/lib/cups/daemon/cups-driverd: Permission denied
I think I did not manually change anything. In dpkg.log I found:
Code:
2008-04-03 10:38:12 upgrade cupsys 1.3.2-1ubuntu7.5 1.3.2-1ubuntu7.6
2008-04-03 10:38:10 upgrade cupsys-common 1.3.2-1ubuntu7.5 1.3.2-1ubuntu7.6
.. and other cups-related packages.
I found several "status 22" posts in forums, but nothing applied to my case. By experiment I found that if I add "User dda" (this is my username) to /etc/cups/cupsd.conf, everything works. But I guess it won't work for other local users in the system.
So, what happened? I compared permissions of cupsd daemon, and the backends and CGIs - all were correct (root:root, 755). In an older system, Feisty with cups 1.2.8, some permissions are different, i.e. there is user cupsys, in my system there is no such user, I think that was changed in cups.
Any help is appreciated. I posted in ubuntuforums.org ( http://ubuntuforums.org/showthread.php?p=4764078), but there was no reply.
Regards,
Dmitry.
|
|
|
|
04-22-2008, 09:29 AM
|
#2
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211
Rep: 
|
I have that same update, and no issues.
my user is not in /etc/cups/cupsd.conf
no sign of any "cupsys" user either
my permissions are like yours
I don't think we can put this on the CUPS update.
Your user needs to be a member of lpadmin group to add/remove printers.
|
|
|
|
04-22-2008, 12:11 PM
|
#3
|
|
LQ Newbie
Registered: May 2004
Location: Rostov-on-Don, Russia
Posts: 16
Original Poster
Rep:
|
Yes, I checked at the very beginning - my user is in lpadmin group. I also see the following in /var/log/messages at boot time:
Code:
Apr 21 12:01:29 x700 kernel: [ 51.120756] Failure registering capabilities with primary security module.
Apr 21 12:01:29 x700 kernel: [ 51.649367] audit(1208764889.568:3): type=1502 operation="inode_permission" requested_mask="a" denied_mask="a" name="/dev/tt
y" pid=6681 profile="/usr/sbin/cupsd"
Maybe it is related?
|
|
|
|
04-22-2008, 07:25 PM
|
#4
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211
Rep: 
|
See this bug report. Also this one. Technically should have been fixed by now.
Mentioned in the (official) Ubuntu Wiki under DebuggingPrintingProblems.
The workaround is: sudo aa-complain cupsd
I don't use apparmor, which is why I don't see this behavior.
|
|
|
|
04-23-2008, 08:05 AM
|
#5
|
|
LQ Newbie
Registered: May 2004
Location: Rostov-on-Don, Russia
Posts: 16
Original Poster
Rep:
|
Thanks.
I have disabled cupsd in apparmor as you suggested, but still getting "PID 27178 (/usr/lib/cups/cgi-bin/admin.cgi) stopped with status 22!" error when there is no "User dda" in cupsd.conf. 
|
|
|
|
04-23-2008, 09:44 AM
|
#6
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211
Rep: 
|
But can you add printers?
What happened to the other errors? syslog?
Status 22 = permission denied.
Increase the debug level in cupsd.conf
|
|
|
|
04-23-2008, 09:57 AM
|
#7
|
|
LQ Newbie
Registered: May 2004
Location: Rostov-on-Don, Russia
Posts: 16
Original Poster
Rep:
|
No, without having "User dda" in cupsd.conf I can not do anything. I already have DEBUG2 log level, see my 1st post..
|
|
|
|
04-23-2008, 09:51 PM
|
#8
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211
Rep: 
|
And the other errors? Presumably the "Failure registering capabilities" error has vanished?
This occurred after an upgrade... have you enabled backports?
Did you completely disable apparmor or just for cupsd?
(I'm trying to figure what I have that is different from you.)
|
|
|
|
04-24-2008, 01:01 AM
|
#9
|
|
LQ Newbie
Registered: May 2004
Location: Rostov-on-Don, Russia
Posts: 16
Original Poster
Rep:
|
Hi Simon,
After running "sudo aa-complain cupsd" I still see the following in /var/log/messages when cupsd is started:
Code:
Apr 24 09:55:32 x700 kernel: [107268.775908] audit(1209016532.184:7): type=1503 operation="inode_permission" requested_mask="a" denied_mask="a" name="/dev/tty" pid=29331 profile="/usr/sbin/cupsd"
I think that the "Failure registering capabilities" message appears only during boot, I will let you know on the next reboot. But I noticed that in the message above requested_mask="a", while in the links you gave me they mention another masks for /dev/tty, "rw". Here is my /dev/tty:
$ ll /dev/tty
crw-rw-rw- 1 root root 5, 0 2008-04-24 09:53 /dev/tty
Regards,
Dmitry.
|
|
|
|
04-24-2008, 03:19 AM
|
#10
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211
Rep: 
|
Hmmm... just to be thorough - disable apparmor completely.
Follow the procedure in the troubleshooting link for posting a bug report.
|
|
|
|
04-25-2008, 05:53 PM
|
#11
|
|
LQ Newbie
Registered: May 2004
Location: Rostov-on-Don, Russia
Posts: 16
Original Poster
Rep:
|
I found what it was -- somehow /usr, /usr/bin, /usr/share permissions were changed from 755 root:root to 700 dda:users. I fixed that, and now everything works fine. I will try to find what exactly caused that change.
Is there a way to audit the system against such changes?
Thanks a lot for attention!
|
|
|
|
04-26-2008, 12:41 AM
|
#12
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211
Rep: 
|
Great - in the unlikely event you find out what it was, you'll have something to contribute.
Cannot think of any way to explicitly audit the system for such a thing.
|
|
|
|
04-26-2008, 09:13 AM
|
#13
|
|
LQ Newbie
Registered: May 2004
Location: Rostov-on-Don, Russia
Posts: 16
Original Poster
Rep:
|
Installed tripwire - will see if it helps to monitor such changes.
|
|
|
|
08-08-2008, 08:12 AM
|
#14
|
|
LQ Newbie
Registered: Aug 2008
Posts: 1
Rep:
|
or sxid (can also generate a report as an mail)
suid, sgid file and directory checking
This program is runs as a cronjob. Basically it tracks any changes in
your s[ug]id files and folders. If there are any new ones, ones that
aren't set any more, or they have changed bits or other modes then it
reports the changes. You can also run this manually for spot checking.
It tracks s[ug]id files by md5 checksums. This helps detect if your files
have been tampered with, would not show under normal name and permissions
checking. Directories are tracked by inodes.
|
|
|
|
08-08-2008, 08:58 AM
|
#15
|
|
LQ Newbie
Registered: May 2004
Location: Rostov-on-Don, Russia
Posts: 16
Original Poster
Rep:
|
Thanks! Looks simpler than tripwire.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:24 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|