[SOLVED] Apparmor is preventing cups-pdf from working
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can someone help me to override apparmor's block of cups-pdf? After a lot of research it appears that the problem is that my home directory is in a linked filesystem.
Every time I try to output to the PDF I get a dmesg error:
That's not "advice" that's just disabling AppArmor. The OP did not ask for that and you definitely didn't give any reason why he should.
Be precise. Which profile exactly should he edit and what should he change or add?
If OP can edit /etc/apparmor.d then OP should be able to disable apparmor (if reqd).
It is difficult to be precise as this file /etc/apparmor.d/usr.sbin.cupsd
is system specific (but it should have enough comments) - maybe the capability to chown is not in place.
I had spent hours going thought the Ubuntu documentation and reviewing all the files in /etc/apparmor.d before posting my message. I was tempted to create a script to disable apparmor every time I need to print a pdf, but I'm very security conscious and wouldn't want it disabled even for an instance.
While reviewing the /etc/apparmor.d files I did see a disable directory with two lines in it. I tried creating a link of my own hoping this would work:
I also have studied the usr.sbin.cupsd file to try to see if I could find a clue in there as to how to stop apparmor from blocking the access. I even removed the usr.sbin.cupsd file and tried to use the pdf function and still got the same error.
Thanks in advance if you have any specifics on how to stop apparmor from blocking the cups-pdf operation.
If OP can edit /etc/apparmor.d then OP should be able to disable apparmor (if reqd).
It is difficult to be precise as this file /etc/apparmor.d/usr.sbin.cupsd
is system specific (but it should have enough comments) - maybe the capability to chown is not in place.
Thanks, Amani. I see you posted a new message while I was composing a response to your previous one. I believe I mentioned that I had already explored all the files in the /etc/apparmor.d to the best of my ability. I had also read, very entently the usr.sbin.cupsd file, the README files, and as I mentioned the documentation, but I'm can't figure out how to disable this blocking.
Maybe I have it wrong, but I tried adding this line to the /etc/apparmor.d/local/usr.sbin.cupsd file:
Code:
/home/users/l/j/ljames/** lrwk,
It appears that the README file is saying this will add permission to the blocked directories.
Have you even removed a blocked applicate from apparmor? Maybe I can test the steps that you have done specifically for a different app.
I got the issue resolved. I'm not sure which of my many attempted resolved the issue. Some of the times I was rebooted after making changes. Some of the times I made changes and then tried to print to pdf.
I believe the key was one of the original attempts I had made, but failed to reboot. But this time I did the following:
Added the following lines to the section with @{HOME}/PDF/:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.