----- Original Message ----- 
From: "Ivor Williams" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: 14 January 2005 08:00
Subject: Temp directory naming, ownership or permissions problem on Solaris


> * Replies will be sent through Spamex to [EMAIL PROTECTED]
> * For additional info click -> http://www.spamex.com/i/?v=4963593
> 
> Hi there,
> 
> I'm using PAR on Solaris 8, and It is working as expected, but for
> one thing:
> 
> each PAR kit is unwrapped into /tmp/par_SYSTEM/...
> 
> This works for the first user who gets to create and own par_SYSTEM. 
> Subsequent
> users get a "no such file or directory" error running any PAR app until 
> I chmod 777 /tmp/par_SYSTEM.
> 
> I thought that PAR should be generating a temp directory name based on 
> the user name.
> 
> It is doing so on other platforms I am using PAR on.

I have done some more digging, in the process discovering some quirky behaviour
when $ENV{PAR_TEMP} and/or $ENV{PAR_CLEAN} are set.

What is happening on my Solaris box is that the environment variable USER
is not set. I had assumed that this was always set on any un*x system.

Here is the code in PAR.pm, in sub _set_par_temp:

        my $username = defined(&Win32::LoginName)
            ? &Win32::LoginName()
            : $ENV{USERNAME} || $ENV{USER} || 'SYSTEM';
        $username =~ s/\W/_/g;

I have added export USER=xxx into the .profile of all user accounts that are
using PAR, and this has solved the problem.

Ivor.

Reply via email to