1.3.22: TMPDIR Initialization

Mark Moore mark.moore@notlimited.com
Sat Apr 5 04:19:00 GMT 2003


TWIMC:

 

I recently did a fresh install of Cygwin on a fresh install of Win2K (my HD
blew a gasket :-( .).  Once the dust settled, I tried to issue the following
command:

 

    perldoc perldoc

 

I was quite surprised to see that it didn't work.  I received the following
error message:

 

$ perldoc perldoc

Error in tempfile() using /XXXXXXXXXX: Parent directory (/) is not writable

 at /usr/bin/perldoc line 564

 

 

After hunting around for half a day, I got it cornered in the
/usr/lib/perl5/5.8.0/File/Spec/cygwin.pm where the code makes an assumption
that the TMPDIR environment variable points to a directory with write
permission.  I'll post a bug on the Perl site, but it seems this is a Cygwin
setup problem as well.

 

A number of Unix ports assume TMPDIR points to an existing directory with
full access to create/delete/read/write files and directories (e.g. Perl).
Shouldn't the Cygwin setup ensure this is a valid assumption?

 

Easy fixes might be to simply set TMPDIR to $TEMP or $TMP, which appear to
be defined as part of the regular Win2K installation, or hard code it to
"/tmp" since that directory seems to be created as part of the Cygwin
install.  (IMHO, the best would be to mount $TEMP as /tmp, and setenv
TMPDIR=/tmp).

 

Either way, the temp directory should grant full r/w/m permission to all
users for that directory (chmod 777 /tmp).  BTW, I tried the chmod fix, and
it didn't seem to stick.  The only way I could really change the permission
was to use the Security tab on the folder Properties dialog.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20030405/d697cc9d/attachment.htm>


More information about the Cygwin-apps mailing list