Arrrg. Or the wonders of secure filesystems

Or: WYSINWYG

So I returned to my postscript card templates a little while ago, only to discover that while everything was peachy in ghostscript, on the screen, the included files were not actually printing. After fooling around for a bit, I figured out that the print daemon must be running with a different local directory, so I had to use the full path for the files. That got one of the two files (and a third small test file) printing. Gradually I started playing with the contents of the problem file. It worked fine if included directly. Eventually I got it down to printing the test file with the the contents of the problem file, less a few blanks, copied line-for-line. Faced with this seeming paradox, I had to conclude that there was something funny about the file itself. In fact, it wasn’t world-readable. Ghostscript was running as me, so it could see it. The printer daemon was not running as me, so it couldn’t see it, and silently failed when it couldn’t find the referenced file. I’m not sure why the file was created without general readability; I can only presume that the author of the imaging software was a little bit paranoid ;^)

Posted Sunday, October 17th, 2004 under War Story.

Tags:

Comments are closed.