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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-09-2003, 05:45 AM
|
#1
|
Member
Registered: Apr 2003
Posts: 30
Rep:
|
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?
|
|
|
04-09-2003, 09:10 AM
|
#2
|
Member
Registered: Apr 2003
Posts: 30
Original Poster
Rep:
|
Has nobody got any idea about this? I'm sure it's something quite simple but I can't work it out.
|
|
|
04-09-2003, 09:51 AM
|
#3
|
Moderator
Registered: May 2001
Posts: 29,415
|
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.
|
|
1 members found this post helpful.
|
04-09-2003, 09:59 AM
|
#4
|
Member
Registered: Apr 2003
Posts: 30
Original Poster
Rep:
|
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.
|
|
|
04-09-2003, 10:31 AM
|
#5
|
Member
Registered: Apr 2003
Posts: 30
Original Poster
Rep:
|
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?
|
|
1 members found this post helpful.
|
04-09-2003, 10:52 AM
|
#6
|
Moderator
Registered: May 2001
Posts: 29,415
|
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.
|
|
|
All times are GMT -5. The time now is 11:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|