Stop Microsoft

Operating Systems => Linux and UNIX => Topic started by: dishawjp on 6 September 2002, 19:41

Title: /tmp directory question
Post by: dishawjp on 6 September 2002, 19:41
Hi All,

I recently completed my first Linux install.  I put Red Hat 6.2 on an old P166 I had.  Just about everything is running well, as far as I can tell, but there are a bunch of files and some directories in my /tmp directory.  I thought that generally any files in a /tmp directory should be deletable.  Anyway, to get rid of them I had to "su - root" and do a "rm -rf"

The files went away, but I made Red Hat very unhappy.  I could no longer get Gnome to start, got a bunch of error messages, and ended up having to reinstall.  The files were some .log files and the directory was orbit-dishawjp.  After the reinstall, they were back.  Should these live somewhere else. and if so, where.  I like to keep an empty directory or two and ended up putting a /temp on my root for now.

Any thoughts, or is this normal for Red Hat?

Jim
Title: /tmp directory question
Post by: voidmain on 6 September 2002, 22:48
There are a few directories/files created in /tmp for X  (when you start X there will be a X0 socket as well as others in there).  The sound system will also use /tmp.  Now some of these programs that write to /tmp are not running under your userid, they are running under other IDs such as root.  When these processes create files the files are owned by that ID and generally you don't want one ID to be able to delete things created by another ID, that would be a huge security violation, hence required you to be root to remove them.

Can you imagine on a multi-user setup when you have more than one user logged in what would happen if one user were allowed to manipulate another user's files? Not good. Now, I wish you would have asked this question before reinstalling because it would have only been about a 10 second fix to get you going again. The system wouldn't be very secure or stable if a normal user had the power to screw up the system or other user's work.  

Now knowing the root password essentially makes you the "system administrator". Historically only people who really know what they are doing have this power but on a desktop system it obviously isn't as critical and is a good way for a person to *become* that expert as in your example.

Generally /tmp *is* a shared area that everyone has the ability to write to and most apps use this area for creating temporary files (or /usr/tmp or /var/tmp, there actually is a philosophy for using one over the other but it isn't that important at your stage). Just remember that Linux is highly concerned about security.  

Each logon ID normally would have full power over it's home directory and full power over anything that ID creates. But that logon ID should not by default have access to remove anything created/owned by any other logon ID, and have varying degrees of access below that (on a need to know basis).

[ September 06, 2002: Message edited by: void main ]

Title: /tmp directory question
Post by: creedon on 6 September 2002, 23:13
quote:
Originally posted by DOSman:
Hi All,

I recently completed my first Linux install.  I put Red Hat 6.2 on an old P166 I had.  Just about everything is running well, as far as I can tell, but there are a bunch of files and some directories in my /tmp directory.  I thought that generally any files in a /tmp directory should be deletable.  Anyway, to get rid of them I had to "su - root" and do a "rm -rf"

The files went away, but I made Red Hat very unhappy.  I could no longer get Gnome to start, got a bunch of error messages, and ended up having to reinstall.  The files were some .log files and the directory was orbit-dishawjp.  After the reinstall, they were back.  Should these live somewhere else. and if so, where.  I like to keep an empty directory or two and ended up putting a /temp on my root for now.

Any thoughts, or is this normal for Red Hat?

Jim



Where abouts in Syracuse do you live?  I'm up on Caughdenoy road, about a mile north of Rte. 31.
Title: /tmp directory question
Post by: Master of Reality on 7 September 2002, 07:54
hmmmmm.... posting your address.... dont worry your house wont be burned down...
Title: /tmp directory question
Post by: creedon on 7 September 2002, 17:43
quote:
Originally posted by Master of Reality / Bob:
hmmmmm.... posting your address.... dont worry your house wont be burned down...
I figure it tis way; based on the level of intelligence of any of the trolls on this board, they couldn't find their ass in a closet using both hands and a flashlight; I don't wrry about the rest of you.
Title: /tmp directory question
Post by: voidmain on 7 September 2002, 18:30
And it's likely you wouldn't want to mess with creedon. He's a big dude, lotsa tatoos, rides a Harley.
Title: /tmp directory question
Post by: creedon on 7 September 2002, 19:21
quote:
Originally posted by void main:
And it's likely you wouldn't want to mess with creedon. He's a big dude, lotsa tatoos, rides a Harley.
No Harley (poverty stricken), but I am big, and I keep an axe-handle near me all the time!
BTW: no tattoos; don't like 'em, lotsa scars, don't like them either.
Title: /tmp directory question
Post by: voidmain on 7 September 2002, 19:27
Damn it!  My image of you is now completely shot! Does that axe handle have an axe head on the end of it?  Not that it matters as the handle, when used by a large angry creedon, would likely dispense plenty of hurt on it's own.
Title: /tmp directory question
Post by: creedon on 7 September 2002, 19:37
quote:
Originally posted by void main:
Damn it!  My image of you is now completely shot! Does that axe handle have an axe head on the end of it?  Not that it matters as the handle, when used by a large angry creedon, would likely dispense plenty of hurt on it's own.
There's not too many more satisfying sounds than the crunch of a shattering cheek bone when you contact it with a hickory axe handle!
Title: /tmp directory question
Post by: voidmain on 7 September 2002, 19:43
That's true, but if it's an early morning hour and very quiet, shortly after you will hear the sweet sounds of several teeth plinking off the wall.
Title: /tmp directory question
Post by: voidmain on 7 September 2002, 19:45
X11, you are one disturbed individual.  (http://smile.gif)
Title: /tmp directory question
Post by: creedon on 7 September 2002, 20:02
quote:
Originally posted by Ex Eleven / b0b:
Im a small dude but freqently pop speed and if you cross me i will cut your lips out and make you kiss your own ass. Then i will slowly cut your head off and eat out of it with a spoon.
If you really want to make a point, pop an eye out and skull-f**k 'em!!
Title: /tmp directory question
Post by: creedon on 7 September 2002, 20:04
Just a thought; I hope the poor bastard that asked the question didn't need a quick answer!
Title: /tmp directory question
Post by: dishawjp on 7 September 2002, 20:45
Hi Creedon,

Actually I live in Meridian.... near Cato.  I work in DeWitt though.  Just thought that if I put Syracuse down, somebody on this list might have a general idea of where I'm from.  Even you're probably not quite sure where Meridian is :)

Jim
Title: /tmp directory question
Post by: choasforages on 7 September 2002, 20:59
yeah, but the good/bad thing about most versions of redhat is that they have a script that goes through and deletes old files out of /tmp so if you want a storage space for yourself or a few poeple,

make a directory called /smb or whatever , i think

and cast this

chmod 1777 /smb
Title: /tmp directory question
Post by: smokey on 7 September 2002, 21:05
"Whenever in doubt (with linux), reinstall." -- Me.
As you might tell I have lots of problems getting linux to work   :D
Title: /tmp directory question
Post by: creedon on 7 September 2002, 21:20
quote:
Originally posted by DOSman:
Hi Creedon,

Actually I live in Meridian.... near Cato.  I work in DeWitt though.  Just thought that if I put Syracuse down, somebody on this list might have a general idea of where I'm from.  Even you're probably not quite sure where Meridian is :)

Jim

It's near Cato, right? >GRIN<