Setting the PreserveTempFiles =1 in WeBWorK/Constants.pm is the right first step.
What I would expect to see then is various files created inside
/usr/local/webwork/tmp/webwork-hardcopy.1pbqkjJv/
The actual temporary directory used to work with TeX is defined at
# Contains non-web-accessible temporary files, such as TeX working directories.
$webworkDirs{tmp} = "$webworkDirs{root}/tmp";
which is in your global.conf file, but the address in the error message looks like the
default.
One thing to make sure of is that the webserver can actually get to
that directory. This means that it needs execute permission on all of
the directories above tmp and it needs
write permission on tmp itself (which apparently it already had).
If the temporary files are being preserved then you should see something like
bash-2.05b$ ls webwork-hardcopy.UK7Fq4Od/ hardcopy.aux hardcopy.log hardcopy.tex
However, reading through the code in Hardcopy.pm I also see a bug in the error message.
at about line 610 there is a message:
"Failed to create $finalFile for no apparent reason.\n"
which should read
"Failed to create $hardcopyFilePath for no apparent reason.\n"
so the error message is actually giving an incorrect path.
I suspect that the place where the permission problem is occuring may
be in the destination file for delivering the hardcopy file. This
should be the directory:
.../myCourse/html/tmp/hardcopy/
and the file name will be something like Homework1.pdf
(the dance.999999. bit in the file name above looks a bit fishy to me, but it might be ok).
Hope this helps.
-- Mike
<| Post or View Comments |>
|