LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-09-2003, 04:45 AM   #1
bananaman
Member
 
Registered: Apr 2003
Posts: 30

Rep: Reputation: 15
Red face ERROR: Couldn't create temporary file in /tmp/


I have installed a new command line utility. I downloaded it and compiled it successfully, and have made a symbolic link from my home/bin directory to the exectuable. I have (as root) done:


chmod 777 /tmp/


but when I run the new program (as me), it doesn't work:


[bananaman@servername]dosomething -h

Couldn't create temporary file in /tmp/


I don't understand this because surely if I anyone can write in that directory? I have checked:


[bananaman@servername]ls -l /

drwxrwxrwx 3 root root [date][time] tmp


What am I doing wrong?
 
Old 04-09-2003, 08:10 AM   #2
bananaman
Member
 
Registered: Apr 2003
Posts: 30

Original Poster
Rep: Reputation: 15
Has nobody got any idea about this? I'm sure it's something quite simple but I can't work it out.
 
Old 04-09-2003, 08:51 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,285
Blog Entries: 54

Rep: Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854
Dunno if it's simple. What app are you trying to run?

AFAIK /tmp needs the sticky bit: chmod 1777 /tmp
If that ain't doin it, and you're damn sure you got all the required configs, supplied the right flags, files and whatnot, (and double checked it all) then I'd run a strace on it: "strace -v -o <logfile> <dosomething flags, etc etc>", then peruse <logfile> for errors. If unsure, post here.
 
Old 04-09-2003, 08:59 AM   #4
bananaman
Member
 
Registered: Apr 2003
Posts: 30

Original Poster
Rep: Reputation: 15
The utilities I am installing are the swftools for manipulating Flash files.

Thanks for responding. From your response at least I can conclude that I'm not doing something completely stupid. I will try what you suggest.
 
Old 04-09-2003, 09:31 AM   #5
bananaman
Member
 
Registered: Apr 2003
Posts: 30

Original Poster
Rep: Reputation: 15
Ok. I've solved it now. I think it was the chmod 1777 that did the trick. Thanks.

Just out of interest, is it best practice to solve this type of problem in this way? I mean, surely it is not good to have any directories that anyone can read or write anything in?
 
Old 04-09-2003, 09:52 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,285
Blog Entries: 54

Rep: Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854
Yes, anyone can read, but if you're exporting a sane umask from /etc/profile no other user should be able to write to your files.
If you're concerned with having a public tempdir, you change it so every human user uses it's ~/tmp in /etc/profile, like:
# Assert UID for human user accounts on not heavily populated boxen starts at 500:
if [ "${UID}" -gt "500" ]; then
TMP="$HOME/tmp"; TMPDIR=${TMP}; export TMP TMPDIR
fi
Watch out for unprivileged system user UID's >500 tho.
AFAIK there's also a PAM module out there that handles tmpdir creation.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
gnupg: changing temporary write directory from /tmp to...? mushmaster Linux - Software 0 03-29-2005 07:19 PM
Problem with lpr - cannot create temporary file fclifton Linux - General 3 09-18-2004 04:43 PM
Create file using 'touch ./tmp.$$', file tmp.3941 is created, why? huangyanfeng Linux - General 1 04-13-2004 03:36 AM
"/tmp/sv001.tmp/setup.bin" error while installing OO1.1.0 Choey Linux - Software 0 09-16-2003 04:52 PM
mogrify: Unable to create temporary file. steelgrave Linux - Software 5 05-31-2003 05:46 PM


All times are GMT -5. The time now is 11:25 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration