LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 01-07-2003, 06:06 AM   #1
cybercop12us
Member
 
Registered: Aug 2001
Posts: 60

Rep: Reputation: 15
a question of tmp dir for solaris/win


hi friends,

first a little background. we are porting a project from windows to solaris.

In windows ,for each user we can setup tmp directories using TMP or TEMP env variables. is it possible in solaris?

upto my knowledge we have only /tmp and usr/tmp?

and another thing is , is there any equivalent for gettemppath() win api in solaris?

thanks in advance,
harish
 
Old 01-07-2003, 08:15 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
You shouldn't have any problems setting up a users own tmp type directory most likely in their own home directory.

Not sure about the "gettemppath() win api in solaris", I'd have to look into that one.
 
Old 01-07-2003, 09:33 AM   #3
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
It can be dangerous to set up a tmp dir for the users in their own
home directory. If you plan on using a lot of space (or even if it's
possible), you don't want to put their tmp directory in their home
directory -- this could cause the user to be locked out of the
system if they happen to go over quota because of the temporary
files. You should, instead, make a /tmp/username/appname (or
/tmp/appname/username) directory. This is safer, /tmp is by
default writable by the world. You should also give the user a
choice as to where the tmp directory is.
I'm not sure what the getttmppath() win API is, but you can
always set an environvent variable called APP_TMP, and use
the C function calls to grab that variable when necessary, if
that's what you are talking about.
 
Old 01-07-2003, 02:44 PM   #4
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Common temp file locations in Solaris are /tmp and /var/tmp. You'll notice that /usr/tmp is really a symlink to /var/tmp. You may also want to note that on a standard Solaris install, /tmp is taken from swap space unless a separate slice is created.
 
Old 01-08-2003, 03:22 AM   #5
cybercop12us
Member
 
Registered: Aug 2001
Posts: 60

Original Poster
Rep: Reputation: 15
hi friends,

thanks for the information.

http://soldc.sun.com/ntmigration/ntt...emulation.html
has got the implementation for gettemppath() win api. The implementaiton returns
/tmp and /var/tmp directories only to the user and if /tmp or /var/tmp is not available they return the current dir[getcwd()] of the process.

Iam thinking of using it.

thanks,
harish
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache/PHP can't write to /tmp dir. Niels@debian Linux - Software 2 05-25-2005 03:10 PM
what do I do with /tmp dir? Bruce Hill Linux - Newbie 10 11-05-2003 09:45 PM
Triple boot Solaris 8, Win 2000, linux 7.2 yassyboy Solaris / OpenSolaris 1 07-16-2003 08:43 PM
a question about /tmp ludwig W Linux - General 21 04-25-2003 11:38 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 01:03 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 05:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration