replacing corrupt /tmp dir..


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users replacing corrupt /tmp dir..
# 1  
Old 05-28-2005
Bug replacing corrupt /tmp dir..

dear unix members...
i have just got done dealing with the worst problem i have dealt with in my two years of unix... on my fedora core 3 2.6.9-1.667 #1 Tue Nov 2 14:41:25 EST 2004 i686 i686 i386 GNU/Linux... the /tmp directory went stale about a month ago.. i had both gnome desktop anf kde installed gnome-conf died... i couldn't resolute the problem although i came close.. so i reinstalled, repartitioned, formatted, configured and reconnected.. it took me 16 hours to recover all files intact from devices, partitions and remote accounts and recondition the system back to its original state with an update from red-hat.com.... anyway to make a long story short: " there must be an easier way!" ... like recreating /tmp from scratch or fscking i.. ..................is there an easier way and what is it..?
any feedback welcome...
moxxx68
have a great memorial day.
# 2  
Old 05-28-2005
What exactly do you mean by "the /tmp directory went stale" ?
# 3  
Old 05-28-2005
it went corrupt... i had selinux enabled enforcing (policy).. AND too many raw files i had tar zipped and installed from tmp.. a bachslash and a bad chmod number didn't mix well with selinux and both the backslash and trying to reconfigure corrupt /tmp which eventually corrupt the ENTIRE system..... all messages and warnings lead back to /tmp...
(gnome specifically is what hit the worst and did the dmage)..
moxxx68
# 4  
Old 05-28-2005
Did you chmod /tmp?

I don't understand what this backslash you keep talking about has to do with your problem, what did you do with it exactly?
# 5  
Old 05-28-2005
sorry! NOT \ i meant / as in chmod xxx /... everything hit xxx and the only dir i couldn't save was /tmp i couldn't quite get the permisssions right... obviuosly /tmp would be one of the more difficult to guess.. i managed to retrieve the other directories by upgradingb the system to install everything.. /tmp though boogered up g-conf and that corrupted the whole operating system eventually including the kde desktop and was irretrievable.

edit: if i could have got rid of /tmp somehow before the bug i created spread i could have saved the system and a whole lot of hassle.. but the os won't boot without /tmp.. so i couldn't do anything..

Last edited by moxxx68; 05-28-2005 at 07:34 PM..
# 6  
Old 05-28-2005
ok, now I understand.

I'm not sure about SELinux, but normally /tmp will be mode 1777. Also there should be no need to recreated it, since /tmp will swap, the disk part of which should be a raw device, the contents of which are volatile, ie /tmp is wiped when you reboot.

Last edited by reborg; 05-28-2005 at 08:00 PM..
# 7  
Old 05-28-2005
prob with selinux is the permission enforcement when enabled.. so it wouldn't let me back in unless i unlocked the perms... close to 1777 is what screwed it up due to SE (security enhanced).... SE refused it and when i finally broke back into the system gconf-usrs had been corrupted.. a few files were erased and a few lib files couldn't be recreated.. so even after i disabled SE reconfiguring gconf files amongst others in /tmp was impossible...

edit;; i know that SE can lock files and i am pretty sure it can erase certain files when necessary.. so i guess those files bit the dust when the chmod hit the targeted SE policy.. if i could configure SElinux (i could do anything!) its government developed and very complex so the better route would be to revamp /tmp.. if i knew how!..
thanx for your input anyways...
moxxx68 (out!)....

Last edited by moxxx68; 05-28-2005 at 08:18 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Assign read write permission to the user for specific dir and it's sub dir and files in AIX

I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
Discussion started by: blinkingdan
0 Replies

2. Shell Programming and Scripting

KSH - Find paths of multiple files in CC (dir and sub-dir))

Dear Members, I have a list of xml files like abc.xml.table prq.xml.table ... .. . in a txt file. Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file. Please help me with the script or command to do so. ... (11 Replies)
Discussion started by: Yoodit
11 Replies

3. UNIX for Dummies Questions & Answers

How to list all files in dir and sub-dir's recursively along with file size?

I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file Please help me in this regard and many thanks in advance. (3 Replies)
Discussion started by: nmakkena
3 Replies

4. Shell Programming and Scripting

A script to find dir, delete files in, and then del dir?

Hello!! I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory: drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies

5. UNIX and Linux Applications

CPIO Problem, copy to the root dir / instead of current dir

HI all, I got a CPIO archive that contains a unix filesystem that I try to extract, but it extract to the root dir / unstead of current dir, and happily it detects my file are newer otherwise it would have overwrited my system's file! I tried all these commands cpio -i --make-directories <... (2 Replies)
Discussion started by: nekkro-kvlt
2 Replies

6. Shell Programming and Scripting

replacing a string in all files in a dir

Hello guys, I need help in globally replacing a string 'string1' with 'string2' in several files in a directory. In fact, also in all directories under it. Can anyone help me... Thanks (3 Replies)
Discussion started by: chiru_h
3 Replies

7. Solaris

Auto delete files in /tmp dir ???

I have a Solris 9 box my problem is when I restart my box all my files and dirs in /tmp dir will be deleted exept 2 directories I found them since installation phase !!!! How to keep my files at that dir " /tmp " even after restarting ??? (1 Reply)
Discussion started by: DarkSoul
1 Replies

8. Shell Programming and Scripting

a script to clone a dir tree, & overwrite the dir struct elsewhere?

hi all, i'm looking for a bash or tcsh script that will clone an empty dir tree 'over' another tree ... specifically, i'd like to: (1) specify a src directory (2) list the directory tree/hiearchy beneath that src dir, w/o files -- just the dirs (3) clone that same, empty dir hierarchy to... (2 Replies)
Discussion started by: OpenMacNews
2 Replies

9. Shell Programming and Scripting

script to go to a different dir to run a commandline prompt in that dir

Hi, I need to know how I'll be able to write a script that can goto a different dir where I don't have access to read,write and execute and also to run a commandline prompt in that dir with one file whose path has to be specified in that command. Will I be able to do this? Any ideas or... (2 Replies)
Discussion started by: ann_124
2 Replies

10. UNIX for Dummies Questions & Answers

monitoring /tmp and /var/tmp for suspicous activity

Hello, does anyone have a script that can check the contents of the /tmp directory and for example e-mail the directory content if anything other than session files are present? Maybe there are better ways to monitor suspicous /tmp and /var/tmp activity, if so I'm listening :) (1 Reply)
Discussion started by: jamesbond
1 Replies
Login or Register to Ask a Question