Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
is it secure to del everything in /tmp? [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dilandau
Guru
Guru


Joined: 24 May 2003
Posts: 485
Location: germany

PostPosted: Fri May 05, 2006 12:22 pm    Post subject: is it secure to del everything in /tmp? [solved] Reply with quote

i noticed there is quite much stuff left in /tmp. is it secure to delete it all (incl dirs)?
_________________
gentoo linux - amd duron stalebred 1600 - elsa gladiac 311 (nvidia) - elitegroup k7s5a (sis, lan) - 256mb ram - wintv pci fm - airstar2 dvb-t pci - ide cdwriter - hp psc 1110


Last edited by dilandau on Fri May 05, 2006 3:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
brims
Guru
Guru


Joined: 19 Apr 2004
Posts: 492
Location: Arizona

PostPosted: Fri May 05, 2006 12:32 pm    Post subject: Re: is it secure to del everything in /tmp? Reply with quote

dilandau wrote:
i noticed there is quite much stuff left in /tmp. is it secure to delete it all (incl dirs)?


I recall someone posting that anything in /tmp should not be expected to exist on boot, by programs or user, looking though my /tmp it seems to just be temporary stuff from cron jobs and Firefox, other miscellaneous things as well, I would say it's safe to delete everything in there.
_________________
Adopt an Unanswered Post
Report violations, duplicates, misplaced, etc
Back to top
View user's profile Send private message
lesourbe
l33t
l33t


Joined: 24 Nov 2005
Posts: 710
Location: Champagne !

PostPosted: Fri May 05, 2006 12:39 pm    Post subject: Reply with quote

I do it once in a while ...
_________________
Is that a banhammer ?
LeSourbe, Member of EPowerforce.
Back to top
View user's profile Send private message
brims
Guru
Guru


Joined: 19 Apr 2004
Posts: 492
Location: Arizona

PostPosted: Fri May 05, 2006 12:44 pm    Post subject: Reply with quote

I never really paid much attention to /tmp, but I'm going to start doing that when I remember, I axe everything in /var/tmp/portage every once in a while, though it doesn't get very large; if you do that, make sure you aren't compiling something with emerge, I've done that one before and emerge doesn't know what to do. Also since I run http-replicator for storing packages to distribute to my local machines I also axe /usr/portage/distfiles/ every once in a while. (Typing that sure makes you miss tab completetion in bash)
_________________
Adopt an Unanswered Post
Report violations, duplicates, misplaced, etc
Back to top
View user's profile Send private message
Aurisor
Guru
Guru


Joined: 20 Sep 2003
Posts: 361
Location: Boston MA

PostPosted: Fri May 05, 2006 1:11 pm    Post subject: Reply with quote

You should be careful, depending on what you're running. PHP, for example, stores its session data in /tmp, so doing a rm -rf /tmp/* would boot any logged-in users from your server. Also, I think KDE stores UI junk in there too...I notice a lot of folders in there with my username in them whenever I start some KDE apps.

In short, it won't break anything permanently, but it can definitely confuse some programs.
Back to top
View user's profile Send private message
lesourbe
l33t
l33t


Joined: 24 Nov 2005
Posts: 710
Location: Champagne !

PostPosted: Fri May 05, 2006 1:16 pm    Post subject: Reply with quote

nothing a reboot could not handle
_________________
Is that a banhammer ?
LeSourbe, Member of EPowerforce.
Back to top
View user's profile Send private message
d4rkwingduck
Apprentice
Apprentice


Joined: 11 Aug 2005
Posts: 220
Location: somwhere on this big blue earth

PostPosted: Fri May 05, 2006 2:53 pm    Post subject: Reply with quote

Last time i did it it stuffed up my xfce on reboot no idea why but after a while it fixed itself i guess. :)
_________________
http://www.di.fm/trance
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Fri May 05, 2006 3:14 pm    Post subject: Reply with quote

One approach would be to check each file/directory in /tmp with fuser and only remove those that have no process using them.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri May 05, 2006 3:17 pm    Post subject: Reply with quote

It's only safe during bootup. Which is what WIPE_TMP="yes" in /etc/conf.d/bootmisc is for.
Back to top
View user's profile Send private message
d4rkwingduck
Apprentice
Apprentice


Joined: 11 Aug 2005
Posts: 220
Location: somwhere on this big blue earth

PostPosted: Fri May 05, 2006 3:49 pm    Post subject: Reply with quote

PaulBredbury wrote:
It's only safe during bootup. Which is what WIPE_TMP="yes" in /etc/conf.d/bootmisc is for.


Thanks for that changed to yes for testing.
_________________
http://www.di.fm/trance
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Fri May 05, 2006 5:07 pm    Post subject: Reply with quote

PaulBredbury wrote:
It's only safe during bootup.

There is one directory with one file in it in /tmp. I created both of them. I no longer have use for either of them. The only safe way I can delete everything in /tmp is to reboot?
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri May 05, 2006 9:35 pm    Post subject: Reply with quote

limn wrote:
There is one directory with one file in it in /tmp. I created both of them. I no longer have use for either of them.

In that case, you can safely delete them :wink:

Personally, I have loads of other files in /tmp since my last reboot over a week ago, placed there by a variety of apps. I'm surprised that you don't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum