Running ROOT in limited account in Win XP

Does ROOT require full admin right to run under Windows XP? When running from a limited accout I get the followin error after starting ROOT:


  •                                     *
    
  •    W E L C O M E  to  R O O T       *
    
  •                                     *
    
  • Version 3.05/07 26 July 2003 *
  •                                     *
    
  • You are welcome to visit our Web site *
  •      [root.cern.ch](http://root.cern.ch)            *
    
  •                                     *
    

FreeType Engine v2.1.3 used to render TrueType fonts.
Compiled for win32gdk.

CINT/ROOT C/C++ Interpreter version 5.15.94, June 30 2003
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
Error: could not create file
Error: could not create file

root[0]

ROOT does not require administritator priviledge to be installed or run.
It is likely that you did not follow the instructions given in our download page. In particular:

When running from the MSDOS prompt, you must set the following environment variables, eg in your autoexec.bat: (Restart the system if you set these variables for the first time).
set TEMP=c:\temp
set HOME=c:\your top directory
set TMPDIR=c:\temp
set ROOTSYS=c:\root (the directory where you installed Root)
set PATH=%PATH%;%ROOTSYS%\bin

Rene

Hi jjofre,
you can also set these variables via
Settings -> Control Panel -> System -> Advanced ->
Enviromental Variables

Regards. Valeriy

++
Check root.cern.ch/root/Version310.html it is much faster.

I have tried the above with no change in the erros messages. If I run as Administrator, everything works fine. Any clues?

Thanks,

Jaime

A little more information. In fact I get this issue with CINT alone as well. If I run as Administrator, I don’t get the problem. Otherwise, I get this:

C:\Jaime>set TEMP=C:\Jaime\temp
C:\Jaime>set HOME=C:\Jaime
C:\Jaime>set TMPDIR=C:\Jaime\temp
C:\Jaime>set ROOTSYS=c:\root
C:\Jaime>set PATH=%PATH%;%ROOTSYS%\bin

C:\Jaime>root


  •                                     *
    
  •    W E L C O M E  to  R O O T       *
    
  •                                     *
    
  • Version 3.05/07 26 July 2003 *
  •                                     *
    
  • You are welcome to visit our Web site *
  •      [root.cern.ch](http://root.cern.ch)            *
    
  •                                     *
    

FreeType Engine v2.1.3 used to render TrueType fonts.
Compiled for win32gdk.

CINT/ROOT C/C++ Interpreter version 5.15.94, June 30 2003
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
Error: could not create file
Error: could not create file

root [0]

C:\Jaime>cint

cint : C/C++ interpreter (mailing list 'cint@root.cern.ch’)
Copyright© : 1995~2003 Masaharu Goto (MXJ02154@niftyserve.or.jp)
revision : 5.15.94, June 30 2003 by M.Goto

No main() function found in given source file. Interactive interface started.
’?’:help, ‘.q’:quit, ‘statement’,’{statements;}’ or ‘.p [expr]’ to evaluate

cint> 1+2
Error: could not create file
cint>

Hi,

got it. tmpname() is called in cint/src/pause.c. tmpname() will generate a FILE with a name like “\a4d.”. Under win XP tmpname() doesn’t care about %TMP%, %TEMP%, or %HOME%; it will always create a FILE in . (Here’s the “%&$* MS” that goes well with this behavior.) So Masa can’t use this function. Can rootdev take care of this, please?

Cheers, Axel.

tmpname is not used anymore by CINT.
This is replaced tmpfile(). This is in
CINT 5.14.105 already in CVS.
It will appear in the binary tar balls next week.
Why is this the first report of such a problem on Xp?
Are you running under CYGWIN?

Rene

Hi Rene,

Maybe because this tmpfile() bug was introduced in XP and Win2k is still widely used? I really don’t know. I believe, though, that on Win2k regular users are allowed to write to C:, whereas under XP they’re not (XP power users are, though).

Good to hear it’s gone now; I must admit I tried it with an older version of root (maybe 4 week old). I’ll check with the current cvs version tonight, if (new source)/(modem speed) permits…

And no, under win32gcc this problem doesn’t exist. Of course not! :-] (cygwin uses its own stdio.h and libc)

Axel.

Hi Rene,

I still see tmpfile() occurrences in current cvs’s cint (I only checked pause.c), both after updating my local repository and looking with lxr. So I don’t believe this problem is fixed…

Axel.

Read my posting carefully

Rene

Sorry, sending out garbage twice a day is a bit too much…

Here’s what I forgot mention, which makes my post more sensible: tmpfile() uses the same buggy tmpname() implementation; so replacing tmpname() by tmpfile() doesn’t solve the issue.

Axel.

The new CINT uses tmpfile instead of tmpnam such that the OS can
automatically delete some temp files required by CINT, even
when the process is killed outside Root.
This si supposed to solve several reports of files with names xxxxcintNM
left in /tmp.

I ignore if tmpfile uses internally tmpnam. If you have any evidence
that tmpnam is wrong, please post it.
If you have a better alternative to tmpfile, please post it.

Rene

At least unter winXP tmpfile() creates a file in the drive’s root dir “”. This prevents regular users (i.e. not power users) from running root.

Axel.

Hi,

So is there a resolution to this issues besides running as admin? As a limited account user I can created files on the root directory (C:) under Windows XP. Is CINT trying to write tmp files some where else?

Regards,

Jaime

Hi,
yepp, Philippe picked this one up now, I believe. He has sent an email to Masa. Someone will post something here when it’s done.
Axel.

Hi,

it seems to me that this problem has not been solved yet. I just tried to run root with regular users privileges, having set the variables as you suggested I still get the following output:

[code] *******************************************

  •                                     *
    
  •    W E L C O M E  to  R O O T       *
    
  •                                     *
    
  • Version 4.00/04 29 April 2004 *
  •                                     *
    
  • You are welcome to visit our Web site *
  •      http://root.cern.ch            *
    
  •                                     *
    

Compiled for win32gdk.

CINT/ROOT C/C++ Interpreter version 5.15.133, Apr 18 2004
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
Error: could not create file
Error: could not create file
Error: could not create file
root [0] Error: could not create file
Error: could not create file
Error: could not create file
Error: could not create file
Error: could not create file[/code]

What do I do wrong?

Thank you

lutz

Indeed it has not be solved yet.

Philippe.

Are there any known work-arounds? Any estimate as to when the problem might be fixed - this now affects some of my users with restricted accounts on xp. Thanks!

Hi Ed,

The problem is solved by compiled CINT with the macro G__TMPFILE defined.

Cheers,
Philipppe

Hello everyone,

Cint already provides several solutions for temporary file creation. Depending on compile options, Cint uses different implementation.
I think I’ll have to give a limiation so that wrong option is not used
for WinXP.

Thank you
Masa Goto