Page 1 of 1
Creating temporary files in current dir is mistake
Posted: 2012-11-21T10:04:36-07:00
by Hubbitus
Hello.
In SELinux restricted environment it is big problem because we can't properly mark such files.
Could you please see on
https://bugzilla.redhat.com/show_bug.cgi?id=825874
May be it will be possible make such directory widely configurable? Say by some env variable?
Re: Creating temporary files in current dir is mistake
Posted: 2012-11-21T11:02:25-07:00
by glennrp
I seem to recall that TMPDIR and MAGICK_TMPDIR can be used for this.
[edit] MAGICK_TMPDIR works fine on my Ubuntu 12-04 platform:
- glenn.rp> mkdir $HOME/TEMP
glenn.rp> TMPDIR=$HOME/TEMP make check
resulted in lots of magick-* files in my TEMP directory while
validate-formats-in-memory was running.
Re: Creating temporary files in current dir is mistake
Posted: 2012-11-24T07:19:43-07:00
by Hubbitus
Thank you for the answer. We trying it.
Re: Creating temporary files in current dir is mistake
Posted: 2012-11-28T04:09:34-07:00
by broucaries
Sorry do you means that imagemagick create temp dir on ./ or in /tmp ?
Thanks
Bastien
Re: Creating temporary files in current dir is mistake
Posted: 2012-11-28T05:31:58-07:00
by magick
By default, ImageMagick puts temporary files in a folder defined by P_tmpdir. This can be overridden by the the environment variables MAGICK_TEMPORARY_PATH, MAGICK_TMPDIR, or TMPDIR. It can also be overridden by the temporary-path policy define in policy.xml. However, if the path is not a directory or if its not readable, the temporary files are put in the current path.