Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-28-2009, 02:37 AM   #1
Registered: Jun 2008
Posts: 56

Rep: Reputation: 15
Files being wiped after theyre modified.


I have this weird, and frustrating, problem where at times, once a file is accessed and saved via nano - the contents of the whole file is wiped. This only happens some of the time.

Also, once the file has been wiped, if i try to write anything afterwards to it, it says it writes successfully, but if i hit ctrl+x to quit, then immediately access it again, it will be blank.

If i go into a root account, and i edit the file, i can successfully open, and save something in its content, but then if i again access it through my user account, i will see the changes there, but if i try to modify it, it immediately goes back to how it was before - being unabel to be written to

The file itself is in /usr/bin - if i try writing something in my local folder, it writes fine, saves fine and is accessed fine.

Any Help would be greatly appreciated, thankyou.
Old 09-28-2009, 03:27 AM   #2
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,811
Blog Entries: 58

Rep: Reputation: Disabled
You've answered your own question. You can only permanently modify files outside your home directory as root.
Old 09-28-2009, 03:37 AM   #3
Registered: Jun 2008
Posts: 56

Original Poster
Rep: Reputation: 15
You've answered your own question. You can only permanently modify files outside your home directory as root
No, this wasnt the problem, i had previously always been able to edit scripts in /usr/bin - and the files were all chmod 777 - further if i didnt have permission, this would not explain why 200 lines of coding would suddenly vanish when i was attempted to make a small change. itd merely refuse to make any changes, not wipe the file.

I managed to find, what i think, was the cause of the problem. The partition where all the system files are held, that is '/' had no space free, as a result of thousands of clientmqueue files, which im confused as to how why they accumulated since the sendmail service was switched off. I was able to write stuff to my home dir, since /home is on a much larger patition with lots of free space. Anyway, after i deleted the files in /var/spool/clientmqueue, i could once again edit scripts fine from my user account (till now im not exactly sure why root was still able to, maybe it was just coincidence that there was some free space when i tried on root, or alike)

So as far as i can understand, anyone who has a similar problem, make sure you check you have sufficient df space.


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
files modified ? sachin1361 Linux - Enterprise 1 03-13-2007 03:11 AM
gnu make recompiles the source files fully even though the files are not modified yasothamani Linux - Software 4 02-07-2007 06:36 AM
Possible hacking; wiped - now hard drive space missing? - hidden files? trekk Linux - Security 9 11-10-2006 10:17 AM
help! urpmi.removemedia -a wiped all my rpm indicator files in mandrake control cente gervin Linux - Newbie 5 03-16-2004 04:50 AM
wiped out lots of files :( skull_crusher Linux - Newbie 0 04-10-2003 04:10 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration