cups-pdf fails to generate file when user does not print to default ~/PDF (apparmor vs.cups-pdf inconsistency)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apparmor (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
cups-pdf (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
cupsys (Ubuntu) |
Won't Fix
|
Wishlist
|
Martin Pitt |
Bug Description
I had a working cups-pdf setup in Feisty, but after the upgrade to Gutsy it doesn't work anymore.
The log file says:
Mon Oct 1 10:05:49 2007 [STATUS] PDF creation successfully finished (nobody)
Mon Oct 1 10:14:51 2007 [ERROR] failed to set file mode for PDF file (non fatal) (/home/
Mon Oct 1 10:14:51 2007 [STATUS] PDF creation successfully finished (hunzikea)
Till Kamppeter (till-kamppeter) wrote : Re: cups-pdf fails to generate file | #1 |
Changed in cups-pdf: | |
importance: | Undecided → Medium |
status: | New → Incomplete |
Alexander Hunziker (alex-hunziker) wrote : | #2 |
I already do have the latest version of CUPS.
Gert Kulyk (gkulyk) wrote : | #3 |
One line in your post may explain why it fails: The default (and therefore allowed by apparmor) place for created pdf's is $(HOME)/PDF. If this directory is not used (or is a symlink, just to add this), that means you've changed the default path in cups-pdf.conf, you'll need to apply this changes in the /etc/apparmor.
The line:
> Mon Oct 1 10:14:51 2007 [ERROR] failed to set file mode for PDF file (non fatal)
> (/home/
leeds me to the assumption, you did change the default-location for pdfs stored by cups-pdf, but you've forgotten to modify usr.sbin.cupsd-file to reflect these changes. If you e.g. want the created pdf-files to be placed on the Desktop, you'll need to change the lines:
@{HOME}/PDF/ w,
@{HOME}/PDF/* w,
into:
@{HOME}/Desktop/ w,
@{HOME}/Desktop/* w,
in the mentioned usr.sbin.cupsd file and restart the apparmor-service.
Martin-Éric Racine (q-funk) wrote : Re: [Bug 147551] Re: cups-pdf fails to generate file | #4 |
On 10/3/07, Gert Kulyk <email address hidden> wrote:
> One line in your post may explain why it fails: The default (and therefore allowed by apparmor) place for created pdf's is $(HOME)/PDF. If this directory is not used (or is a symlink, just to add this), that means you've changed the default path in cups-pdf.conf, you'll need to apply this changes in the /etc/apparmor.
> The line:
> > Mon Oct 1 10:14:51 2007 [ERROR] failed to set file mode for PDF file (non fatal)
> > (/home/
> leeds me to the assumption, you did change the default-location for pdfs stored by cups-pdf, but you've forgotten to modify usr.sbin.cupsd-file to reflect these changes. If you e.g. want the created pdf-files to be placed on the Desktop, you'll need to change the lines:
>
> @{HOME}/PDF/ w,
> @{HOME}/PDF/* w,
>
> into:
>
> @{HOME}/Desktop/ w,
> @{HOME}/Desktop/* w,
>
> in the mentioned usr.sbin.cupsd file and restart the apparmor-service.
You found the real bug. Well done!
Till: would it make more sense to put that AppArmor segment into the
cups-pdf package, so that we could modify it as the package evolve and
also document it as a part of cups-pdf, in case people decide to
select a non-default output path?
Till Kamppeter (till-kamppeter) wrote : Re: cups-pdf fails to generate file | #5 |
Gert Kulyk, good idea with moving the AppArmor config to cups-pdf. This improves the maintainability a lot.
Pitti, is this possible without any problems?
Changed in cups-pdf: | |
status: | Incomplete → Fix Committed |
Till Kamppeter (till-kamppeter) wrote : | #6 |
The next release of the cups-pdf and cupsys packages will allow ~/Desktop as PDF destination directory and use it as the default.
Gert Kulyk (gkulyk) wrote : | #7 |
I've posted a possible cause for the mentioned behavior, the idea is from Martin-Éric Racine :-).
Till Kamppeter (till-kamppeter) wrote : | #8 |
Martin, Gert, sorry, cut-and-paste mistake.
Martin-Éric Racine (q-funk) wrote : Re: [Bug 147551] Re: cups-pdf fails to generate file | #9 |
On 10/3/07, Till Kamppeter <email address hidden> wrote:
> Martin, Gert, sorry, cut-and-paste mistake.
No problemo. :)
Till Kamppeter (till-kamppeter) wrote : Re: cups-pdf fails to generate file | #10 |
I have withdrawn the proposed fix of moving the output to the ~/Desktop directory (and allowing cups-pdf to write to there) as this will have several problem. Users can configure another directory to be displayed on the desktop and also they could not like the desktop being cluttered by the generated PDFs. So we will leave the destination being "~/PDF", as no known application is using this directory.
The only solution in our environment with AppArmor-protected CUPS would be to have a user tool for changing the destination directory which changes both the cups-pdf and AppArmor config files and then we would have the problem of a tool running as an arbitrary normal user modifying the configuration of a central security subsystem. In general, a major redesign of the PDF generator CUPS queue concept by upstream would be needed for which it is too late to include it in Gutsy.
In general it is a much better solution to have the applications by themselves generating PDFs via "File"/"Export to PDF ..." or "File"/"Print ...". OpenOffice.org has "File"/"Export to PDF ..." and the current printing dialogs of both KDE and GNOME have functionality to print into a PDF file, actually saving it as PDF, asking the user for name and location. This is the most intuitive way and does not involve any system process which runs with other rights than the calling user, so it gives also the maximum security.
cups-pdf is an interim solution for all the apps which did not yet adopt the latest printing dialogs (especially Firefox and Thunderbird). So we will remove cups-pdf from Ubuntu as soon as all apps have caught up. In the mean time we will only sync with upstream and fix bugs.
The real bug is in the apps which do not use the current printing dialogs.
Changed in cups-pdf: | |
importance: | Medium → Wishlist |
status: | Fix Committed → Confirmed |
Martin-Éric Racine (q-funk) wrote : Re: [Bug 147551] Re: cups-pdf fails to generate file | #11 |
On 10/4/07, Till Kamppeter <email address hidden> wrote:
> I have withdrawn the proposed fix of moving the output to the ~/Desktop
> directory (and allowing cups-pdf to write to there) as this will have
> several problem.
Agreed.
> cups-pdf is an interim solution for all the apps which did not yet adopt
> the latest printing dialogs (especially Firefox and Thunderbird). So we
> will remove cups-pdf from Ubuntu as soon as all apps have caught up. In
> the mean time we will only sync with upstream and fix bugs.
Actually, no. CUPS-PDF fulfills a much bigger role than playing
stop-gap for applications not integrated with GNOME or KDE. It's also
extremely useful as a way of receiving files from a variety of command
line tools and daemons and making PDF content out of that. Thus,
removing it once legacy apps have caught up with direct CUPS
interfacing is not a good idea, since it actually has uses beyond
desktop environments.
--
Martin-Éric Racine
http://
NoOp (glgxg) wrote : Re: cups-pdf fails to generate file | #12 |
After today's updates, I found that none of my cups-pdf printers work on any of my Gutsy systems. I resolved the problem by:
$ sudo apt-get remove --purge apparmor apparmor-utils
IMHO apparmor should not be installed by default (it was optional in Feisty). Added apparmor info:
https:/
https:/
http://
Related bugs cups-pdf bugs that are apparmor created/related:
https:/
Till Kamppeter (till-kamppeter) wrote : | #13 |
NoOp, AppArmor is installed by default as a new security concept for CUPS, replacing the old, ugly patches making CUPS running as a non-root user (which are not supported upstream). As cups-pdf is called by CUPS, the AppArmor profile of CUPS also applies to cups-pdf.
Martin-Éric Racine, cups-pdf is not really needed to create PDFs out of scripts. You can call all filters, like pstopdf, ps2pdf, dvipdf, convert (ImageMagick), ... directly from the command line, even the CUPS filters in /usr/lib/
NoOp (glgxg) wrote : Re: [Bug 147551] Re: cups-pdf fails to generate file | #14 |
> NoOp, AppArmor is installed by default as a new security concept for
> CUPS, replacing the old, ugly patches making CUPS running as a non-root
> user (which are not supported upstream). As cups-pdf is called by CUPS,
> the AppArmor profile of CUPS also applies to cups-pdf.
>
Thanks for the info, I'll add apparmor back in. I also notice that
todays updates include some reversals/changes for cups/cups-pdf so I'll
load apparmor before applying those new updates.
NoOp (glgxg) wrote : Re: cups-pdf fails to generate file | #15 |
Added apparmor back in, installed all of todays Gutsy updates (Accepted cups-pdf 2.4.6-3ubuntu9 (source)) etc., and print to cups-pdf to /PDF worked. I then changed /etc/cups/
Fri Oct 5 11:56:02 2007 [ERROR] failed to create directory (/root/PDFPrinter)
Fri Oct 5 11:56:02 2007 [ERROR] failed to create user output directory (/root/PDFPrinter)
Removing apparmor allowed the cups-pdf print job to go to the existing /PDFPrinter directory.
Changing cups-pdf.conf again to Out ${HOME}/PDFPrint (without creating a /PDFPrint directory first), then printing: 1) created the directory, and 2) printed the PDF in the newly created /PDFPrint directory. Is this the security issue that apparmor is to protect against? If so, is there a way to sync the apparmor profile with cups-pdf.conf?
As an added note: I notice that the printer icon now stays in the panel following any first print job. Previously it disappeared after the print job was finished. Is this something new/expected, or is it a bug?
Till Kamppeter (till-kamppeter) wrote : | #16 |
The printer icon is another implementation now. It is provided by system-
It looks like that you are trying to generate PDF files by printing files as root (destination /root/PDFPrinter). Perhaps AppArmor can only cope with /home/$USER/ home directories. Try as normal user at first.
Syncing the AppArmor profile with the PDF destination is difficult, once because only root can change the AppArmor configuration and normal users change their PDF destinations and second, every user can set his PDF destination independently, to a different place. The AppArmor profile opens up only one place.
stefangachter (stefan-gachter) wrote : | #17 |
Please, can anybody help. I delete Ubuntu 7.04 and installed 7.10 and now I have exactly this problem. So, I followed the steps above.
My /etc/cups/
Out ${HOME}/Download
My /etc/apparmor.
@{HOME}/Download/ w,
@{HOME}
I restarted the whole system but I still get the error:
Wed Oct 24 07:01:45 2007 [ERROR] failed to set file mode for PDF file (non fatal) (/home/
Do I have to change something else? Did I do something wrong?
I cannot find any pdf file. Even with the standard configuration, no pdf file is created. Under 7.04 it worked perfectly but now it is a total mystery.
Please, can anybody help... why doesn't it work in my case?
Thanks a lot, Stefan
stefangachter (stefan-gachter) wrote : | #18 |
Sorry for my pleading... in a final attempt, I restarted my system again. Restarting the services seems not to be enough. And now it works. BUT, only if I do a printout from an application. If I use the "Print Test Page" button, in the printer configuration, nothing happens. I had this problem in 7.04 already. The "Print Test Page" button did and does not work properly, because it does not consider the current CUPS configuration! Is this kind of a joke?
JSladek (wb4ubd) wrote : | #19 |
The same thing happened to me, however, I found the "PrintTest Page" file in /var/spool/
stefangachter (stefan-gachter) wrote : | #20 |
Yes, indeed, all the test-page-files ended up in /var/spool/
Till Kamppeter (till-kamppeter) wrote : | #21 |
How did you send the test page to the PDF printer? If you send it from system-
stefangachter (stefan-gachter) wrote : | #22 |
I understand, however, in my case, I sent the test pages from system-
What you described above makes sense from a sys admin point of view, however, from user point of view, it can be quiet annoying, because different applications have a different printing behaviors, depending on their "mode". Would be nice to have something more consistent in future...
JSladek (wb4ubd) wrote : | #23 |
I concur 100% with stefangachter. As far as I can see, the only item showing up in anonymous is the Test Page from the printer setup tool - which inconsistent with the Kamppeter discussion.
modred (bobanderson) wrote : | #24 |
I tried to change the output directory to 'autosave' from 'PDF' by changing the /etc/apparmor.
Oct 30 11:53:47 dell kernel: [ 341.940275] audit(119377042
Oct 30 11:53:47 dell kernel: [ 341.940285] audit(119377042
Oct 30 11:53:47 dell kernel: [ 342.013681] audit(119377042
Anyone have any idea what I need to do to get this working. This works if I leave the output directory as 'PDF', and I was able to change the output directory to 'autosave' in Feisty. I reinstalled the PDF printer driver, but this didn't help.
Thanks!
Martin-Éric Racine (q-funk) wrote : | #25 |
Till, I never said anything about scripts; I spoke about uses beyond the desktop. CUPS-PDF is meant as a printer. As with any other printer, the point is to make it accessible via CUPS. It is not meant to replace an application's ability to generate a PDF via the Desktop Environment's own services (gtkprint, gnomeprint, etc.). Thus, trying to make CUPS-PDF fit the paradigm of a Print dialog is completely the wrong approach. Besides, it's not an interim solution or a replacement for a unified cross-DE printing system. CUPS-PDF simply addresses a completely different need, in the first place.
atom (isawdrones) wrote : | #26 |
I was having this same problem with a non-standard HOME location. For example, my home is /adam .
To me, @{HOME} should work for any home location, but clearly it does not.
labinnsw (labinnsw) wrote : | #27 |
I am trying to find the solution to the original problem in here, but I cannot seem to understand it. Could someone please do a step by step summation of the steps that need to be taken to solve the problem.
Eric Belhaire (ebelhaire) wrote : | #28 |
I have the same with a cups-pdf fails to generate any file, on an updated Gutsy system (everything was perfect with Feisty).
In /var/log/
Mon Dec 3 07:11:26 2007 [ERROR] failed to set file mode for PDF file (non fatal) (/home/
In /var/log/kern.log:
Dec 3 08:11:25 monbillou kernel: [ 1098.324000] audit(119666588
Dec 3 08:11:25 monbillou kernel: [ 1098.324000] audit(119666588
Dec 3 08:11:26 monbillou kernel: [ 1098.412000] audit(119666588
In /etc/cups/
Out ${HOME}/PDF
(HOME is /home/eric/ubuntu)
In /etc/apparmor.
@{HOME}/PDF/ w,
@{HOME}/PDF/* w,
It seems that the new system does not accept my configuration, but why ? Is it because home is non standard as it is /home/eric/ubuntu ?
Any idea ?
ericbe
labinnsw (labinnsw) wrote : | #29 |
I have found a solution to my problem. Before I give the solution, I would like to briefly describe what my problem was and how it started.
I had a working Feisty and upgraded to Gutsy. After that I could no longer print to PDF. I read and followed the instructions from various posts and nothing changed until last night. I found a post at https:/
It may or may not work for you. If it does work I would like to know.
labinnsw
Till Kamppeter (till-kamppeter) wrote : | #30 |
AppArmor issue, moving to CUPS ...
Changed in cups-pdf: | |
assignee: | nobody → pitti |
Eric Belhaire (ebelhaire) wrote : | #31 |
The solution proposed by labinnsw works for me too.
ericbe
Paolo (paolo-notari) wrote : | #32 |
the solution proposed by labinnsw didn't work for me
$ sudo apt-get remove --purge apparmor apparmor-utils worked properly in order to reetabilish pdf printing with desired output.
it would be interesting to know when apparmor will have a fix, in order to reinstall it.
Sean "Diggity" O'Brien (seandiggity) wrote : | #33 |
I changed the cups-pdf output directory in /etc/cups/
Out ${HOME}/Desktop
and also in /etc/apparmor.
@{HOME}/Desktop/ w,
@{HOME}/Desktop/* w,
It didn't work, so I ran:
sudo aa-complain cupsd
...and now the cups-pdf printer saves PDFs to the ~/Desktop folder. Thanks labinnsw for the (temporary?) solution. Does anyone know if setting cupsd to "complain mode" is unwise for any reason? I don't have any expertise on this issue.
Also, when I "Print Test Page" via /usr/bin/
Martin Pitt (pitti) wrote : Re: [Bug 147551] Re: cups-pdf fails to generate file | #34 |
Hi,
Sean Diggity O'Brien [2008-01-01 19:57 -0000]:
> ...and now the cups-pdf printer saves PDFs to the ~/Desktop folder.
> Thanks labinnsw for the (temporary?) solution. Does anyone know if
> setting cupsd to "complain mode" is unwise for any reason? I don't have
> any expertise on this issue.
That'll work of course, but cupsys is a pretty big attack vector for
security vulnerabilities, especially if you export printers to the
local network. If you are in a home network with a trusted local
ethernet, or just use it locally with trusted users on your box, you
can disable it without worrying a lot.
Changed in apparmor: | |
status: | New → Confirmed |
Changed in cups-pdf: | |
status: | New → Confirmed |
Chris Conroy (chrisconroy) wrote : | #35 |
i have my /home directory symlinked to another location due to my partitioning setup. as a result, I had to add another entry into $HOMEDIRS in /etc/apparmor.
I imagine users experienced with apparmor already know to do this, but I'm new to Ubuntu and it took me a little while to troubleshoot this bug. perhaps it will be a useful hint to others who google the error and come here.
Mark Kohler (mkohler) wrote : | #36 |
- cups-pdf_log Edit (3.9 KiB, text/plain)
I'm seeing the same error everyone else is talking about ("failure to set file mode"), except that setting aa-complain, or even removing apparmor entirely doesn't fix the problem for me. Plus, my home directory isn't in a non-standard place.
I had this working on edgy, but I seem to remember I had to do a bunch of configuration hacking to make it work. I'm wondering if something I did then is causing a problem now. (I'm using an up-to-date gutsy.)
I've bumped up the log level of /etc/cups/
Helge Stenström (h-stenstrom) wrote : | #37 |
How do you bump the log level of /etc/cups/
I have a similar problem. When I'm logged in as my regular user, printing to ~/PDF doesn't work. But as another user it works.
An perhaps important difference is that the first user is at /localhome/
Or perhaps not. I just saw in /var/log/
Fri Mar 7 16:45:12 2008 [ERROR] failed to set file mode for PDF file (non fatal) (/localhome/
a number of times.
Onno Benschop (onno-itmaze) wrote : | #38 |
Helge, in /etc/cups/
Martin Pitt (pitti) wrote : | #39 |
Not an AppArmor bug.
Changed in apparmor: | |
status: | Confirmed → Invalid |
Martin Pitt (pitti) wrote : | #40 |
cups-pdf itself works as designed, not a bug there either.
Changed in cups-pdf: | |
status: | Confirmed → Invalid |
Martin Pitt (pitti) wrote : | #41 |
If you change configuration files in cups-pdf, then you need to do the corresponding change in cupsys' apparmor profile. While this is slightly inconvenient, we won't change this. cups-pdf is scary enough as it is, so we won't relax the AppArmor proptection further.
Thank you! Martin
Changed in cupsys: | |
status: | Confirmed → Won't Fix |
Sean "Diggity" O'Brien (seandiggity) wrote : | #42 |
This appears to be fixed in the Hardy beta. I changed the cups-pdf output directory in /etc/cups/
Out ${HOME}/Desktop
...and it worked with no need to do anything else :)
Martin-Éric Racine (q-funk) wrote : | #43 |
Sean, can you please paste us the result of the following command?
dpkg -l | grep armor
Thanks!
Sean "Diggity" O'Brien (seandiggity) wrote : | #44 |
ii apparmor 2.1+1075-0ubuntu9 User-space parser utility for AppArmor
ii apparmor-utils 2.1+1075-0ubuntu9 Utilities for controlling AppArmor
I just did a fresh install of Hardy on a Thinkpad T30, and it worked.
Rüdiger Blach (rblach) wrote : | #45 |
My problem was a non-standard home directory:
Fri Apr 11 17:27:37 2008 [ERROR] failed to set file mode for PDF file (non fatal) (/wihome/
Chris Conroy's (2008-01-19) solution works for me. Thank you Chris!
I changed in `/etc/apparmor.
the line "@{HOMEDIRS}
into "@{HOMEDIRS}=/home/ /wihome/*/"
and reloaded it with `/etc/init.
So I think it is not really a bug,
but an apparmor related configuration task for an administrator.
LeoRochael (leorochael) wrote : | #46 |
In my system, a Gutsy, the problem was solved by editing
/etc/
and changing the entry that read:
/usr/lib/
to:
/var/lib/
Since that was the path to the executable which apparmor complained about violations in /var/log/kern.log
Reading /var/log/kern.log is the ticket out of this issue.
Mark Kohler (mkohler) wrote : | #47 |
In case someone else is having these symptoms independently of apparmor, the problem on my gutsy system was that there was no /var/tmp, and without that, ghostscript refused to create the PDF file. I have no idea what happened to my /var/tmp, but once I re-created it, cups-pdf worked fine.
Martin Pitt (pitti) wrote : Re: [Bug 147551] Re: cups-pdf fails to generate file when user does not print to default ~/PDF (apparmor vs.cups-pdf inconsistency) | #48 |
LeoRochael [2008-04-22 23:20 -0000]:
> /var/lib/
>
> Since that was the path to the executable which apparmor complained
> about violations in /var/log/kern.log
What??? The Debian/Ubuntu package does no such thing. The binaries are
shipped and installed into /usr/lib/
Do you use some third-party packages or other customizations?
Sean "Diggity" O'Brien (seandiggity) wrote : | #49 |
On my updated Hardy machines, I have to edit two files to get this to work.
I changed the cups-pdf output directory in /etc/cups/
Out ${HOME}/Desktop
and also in /etc/apparmor.
@{HOME}/Desktop/ w,
@{HOME}/Desktop/* w,
...I did not need to set cupsd to complain mode as in the past with Gutsy, however. Not sure why I had to edit those two files, since editing only /etc/cups-pdf.conf worked when I posted last month. I'm running the same package versions I did then:
ii apparmor 2.1+1075-0ubuntu9 User-space parser utility for AppArmor
ii apparmor-utils 2.1+1075-0ubuntu9 Utilities for controlling AppArmor
John Johansen (jjohansen) wrote : | #50 |
Sean,
would it be possible to attach your log files or a section of them so that I can analyze why it is requiring
@{HOME}/Desktop/ w,
@{HOME}/Desktop/* w,
Sean "Diggity" O'Brien (seandiggity) wrote : | #51 |
From /var/log/
Wed May 7 14:03:43 2008 [ERROR] failed to set file mode for PDF file (non fatal) (/home/
Wed May 7 16:27:15 2008 [ERROR] failed to set file mode for PDF file (non fatal) (/home/
I was not able to generate /home/diggity/
For the corresponding jobs, /var/log/
localhost - - [07/May/
localhost - - [07/May/
For the corresponding jobs, /var/log/
For the corresponding jobs, /var/log/
PDF diggity 13 [07/May/
PDF diggity 14 [07/May/
There is nothing in /var/log/apparmor. None of the info above seems helpful, so please let me know if I should look elsewhere.
Martin Pitt (pitti) wrote : | #52 |
Sean Diggity O'Brien [2008-05-08 5:36 -0000]:
> There is nothing in /var/log/apparmor. None of the info above seems
> helpful, so please let me know if I should look elsewhere.
Unfortunately AppArmor kernel errors do not land there, but in
kern.log. Please try
grep audit /var/log/kern.log
right after you reproduced the problem. Thanks!
drink (martin-espinoza) wrote : | #53 |
I'm having this problem on Gutsy, too. Soon I guess I will be upgrading to Hardy, but it is sad to have to upgrade the OS to fix printing.
My system is saving PDFs to ~/PDF. Or at least it should:
Out ${HOME}/PDF
Haven't messed with the apparmor config at all. In fact AppArmor has NEVER worked on my system:
$ sudo /etc/init.
FATAL: Error inserting apparmor (/lib/modules/
$Loading AppArmor module: Failed.
The system was upgraded from dapper to edgy to feisty to gutsy. So it doesn't even register! So, how could it be responsible for this problem? Maybe it isn't?
Sat May 17 14:41:07 2008 [ERROR] failed to set file mode for PDF file (non fatal) (/home/
Of course doing "grep audit /var/log/kern.log" produces no output - because AppArmor doesn't even load here.
This worked in Feisty, magically broke itself in Gutsy, AppArmor is not or at least should not be the problem. What's up?
pt123 (pt123) wrote : | #54 |
confirming this in Hardy, changing the PDF folder in the home dir to a Syslink folder, throws the same error.
[ERROR] "failed to set file mode for PDF file "
mexlinux (mcanedo) wrote : | #55 |
Tom Cameron (drdabbles) wrote : | #56 |
My Hardy machine is part of a Windows domain, meaning my home is /home/DOMAIN/user. This throws off AppArmor, and I have to manually add the full path to my ~/PDF directory just to print a PDF. Seems AppArmor is a bit buggy with "non-typical" paths.
Claus Frein (cfrein) wrote : | #57 |
Same issue for me using likewise-open to authenticate against Active Directory. The path to $HOME seems not to be used by apparmor for domain-users.
Bob Blanchard (blabj) wrote : | #58 |
Had this issue on hardy, found this bug - thought I'd share my solution.
In /etc/apparmor.
/usr/lib/
#include <abstractions/base>
#include <abstractions/
#include <abstractions/
#include <abstractions/
capability chown,
capability fowner,
capability fsetid,
capability setgid,
capability setuid,
/bin/dash ixr,
/bin/bash ixr,
/etc/papersize r,
/etc/
@{HOME}/PDF/ rw,
@{HOME}/PDF/* rw,
/usr/bin/gs ixr,
/usr/
# /usr/lib/
/usr/share/** r,
/var/
/var/
/var/tmp/ rw,
/var/tmp/** rw,
/var/spool/cups/ rw,
/var/
}
NOTE: commented out reference to non-existent /usr/lib/
ALSO - output directory has to have perms at 700.. ie. chmod 700 ~/PDF
Jay (jerome-avond-free) wrote : | #59 |
Sorry I haven't got the time to read the rest,
What about changing /etc/apparmor.
@{HOME}/PDF/ rw,
@{HOME}/PDF/* rw,
by that :
@{HOME}/ rw,
@{HOME}/** rw,
Anybody can set up his output as he wants in /etc/cups/
And everything's okay.
hanasaki (hanasaki-ubuntu) wrote : | #60 |
2009-08-30 Juanty with all current updates
- out of the box installation
- apparmor : not changed
@{HOME}/PDF/ rw,
@{HOME}/PDF/* rw,
- NFS mounted home dir fails to print PDF
/storage/
etab =
10.1.1.
~home directories are automounted by autofs from /storage/
automount file
* -fstype=
ERROR SHOWN IN SYSLOG
==================
... operation=
pmoreno (mdpmgdb) wrote : | #61 |
Hi all,
We've configurated CUPS which prints correctly both in local (in /home/pilar/PDF directory) and remote (in /var/spool/
In local, we can print the pdf file in any directory we indicate (E.g.: /home/pilar/PDF). However, in remote we are just able to print in /var/spool/
If we change the directory name AnonDirName /var/spool/
[ERROR] failed to set file mode for PDF file (non fatal) (/home/
We tried with the command sudo aa-complain cupsd, but the error remains.
Do you know why is this happening? We would really appreciate your help.
Looking forward to hear from you.
Thank's in advance
pmoreno (mdpmgdb) wrote : | #62 |
Hi all again,
i solved my problem with: sudo chmod 777 -R /home/pilar/java
thanks
Tim Golobic (timgolobic) wrote : | #63 |
I'd like to output to the desktop instead of the cups-pdf folder.
I changed the cups-pdf output directory in /etc/cups/
Out ${HOME}/Desktop
But now nothing happens. The PDF does not end up on the Desktop not in the cups-pdf folder. The log says successfully created.
This is under a new Snow Leopard install. With the AnonDirName and Spool path settings commented out as the default.
Thanks
Tim
Christian (c-pradelli) wrote : | #64 |
If user home is not in default linux path ("/home/...") you need to reconfigure apparmor, previous to Lucid you need to edit:
sudo gedit /etc/apparmor.
an add your home directories path in:
@{HOMEDIRS}=/home/ /my_homes_path/
In Lucid you can do:
sudo dpkg-reconfigure apparmor
Also in Lucid, if home is in NFS mount, is not necessary any more to export it no_root_squash
MANGA Willy Ted (manga-willy) wrote : | #65 |
@christian
"Also in Lucid, if home is in NFS mount, is not necessary any more to export it no_root_squash "
Are you sure about your statement ?
When I read cups-pdf README [1] it is said " Make sure if any of CUPS-PDF's working directories (e.g. output) are located on an NFS mounted volume they are mounted without root_squash! "
1. /usr/share/
Josef Hopfgartner (josef-netzagentur) wrote : | #66 |
This is what syslog says:
apparmor="DENIED" operation="connect" profile=
So, in /etc/apparmor.
/run/
Norbert (nrbrtx) wrote : | #67 |
Found interesting moment:
my home folder has two partitions (with AuFS), cups-pdf stopped to work after such migration with messages:
[ERROR] failed to create user output directory (/home/norbert/PDF)
Oct 8 22:26:52 localhost kernel: [ 1266.664351] type=1400 audit(141279281
I got it working again after adding /mnt/UHOME_HDD and /mnt/UHOME_SSD as homes to 'dpkg-reconfigure apparmor'. Hope it help somebody.
Zenaan Harkness (zenaan) wrote : | #68 |
For reference, just steamrolled through this same saga, and finally figoured out that Geany and Mousepad each use the same print dialog (gnome?) which provides a "print to file" option, which provides to choose both a save location and the output/save format (PDF, PS, SVG). That might help some who missed the obvious...
Probably the AppArmor protection of CUPS prevents the generation of the PDF. Please update your system to have the newest CUPS (at least 1.3.2-1ubuntu1).