Re-appearing Files


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Re-appearing Files
# 1  
Old 08-12-2015
Re-appearing Files

Gurus

I am running an AIX 7.1 system and have come across a strange [ and hopefully explainable ] issue.

I am trying to delete files from a folder using standard 'rm' syntax. After i delete the files , files re-appear again.

File renaming or editing does not help. Files re-appear with 0 bytes again. They are always 0 bytes.

I have checked processes running under this user as well all in general but it's hard to say which process/daemon is causing this happen.

Any light shed on this in highly appreciated !

Abhi
# 2  
Old 08-12-2015
What does ls -l show for one of these files? They are regular files, correct?
# 3  
Old 08-13-2015
This sounds very strange.

Are the inode numbers the same before and after?

Code:
# ls -li

will give you the inode number of each file in column 1.

We would all assume that the files are being emptied (zero length) so the inode numbers would remain the same. If however the inode numbers change then something is recreating the files.

---------- Post updated at 10:38 AM ---------- Previous update was at 10:28 AM ----------

Another thought is to search your system for all files called 'rm'.

Are you running the 'rm' that you think you are?

Perhaps someone has created a script named 'rm' which is being found first on the search path and you are not executing the actual operating system command that you thought you were.
# 4  
Old 08-13-2015
Inode numbers stay the same. Everything is just what it was. File names, sizes , inode numbers ,file timestamps.

One more observation

If i copy files to this folder from 'somewhere' using ftp/sftp ,this strange behavior takes place but if i create a file in this folder ,say, using 'touch' and delete it , it does not re-appear.

I have checked all possible scripts and none of them use 'rm' in them.

Abhi

---------- Post updated at 09:08 PM ---------- Previous update was at 07:50 PM ----------

these are regular files...


anyone has any direction for me ?


Abhi

---------- Post updated at 09:18 PM ---------- Previous update was at 09:08 PM ----------

i am seeing something like

Code:
<Server_Name>:<ID_HOME/Test $ ps -aef | grep 8847604
    root  8847604 15466562   0 11:36:45      -  0:00 sshd: ID@notty
ID  9109518  8847604   0 11:36:49      -  0:00 /usr/sbin/sftp-server -m /etc/ssh/sshd_config


This looks like a loop to me .... can i break it with 'pkill' or something ?


Abhi

Last edited by Corona688; 08-13-2015 at 01:05 PM..
# 5  
Old 08-14-2015
These just look like child and parent processes to me. I don't see a problem there.

I think we need to review the facts of this issue.

The files you have trouble deleting are ONLY the one's created via ftp/sftp from another system, yes?

The files created in that way can then be listed and show a non-zero size, and are normal files, yes?

When you 'rm' these files they "re-appear" as zero length files. Do they actually get removed and then recreate themselves, or do they simply get reduced to zero length? Can you tell what is happening?

You say the inode numbers aren't changing. If you create, say, 10 files via ftp and list them, all 10 will be zero length after rm with the same inode numbers, yes?

What type of filesystem is it? I'm not an AIX expert but have you checked the integrity of this filesystem with the appropriate tool?

If you have more than one filesystem does this issue occur if you try it on another filesystem?

Sorry for all the questions but this issue sounds real strange.

Incidentally, files being created via ftp with zero length is a well known problem on some Unix O/S's but you definitely say that the created files are non-zero when first copied onto the system?

Last edited by hicksd8; 08-14-2015 at 07:43 AM..
# 6  
Old 08-14-2015
Did you check if the file is in use before you deleted them - maybe by the sftp-process? It's been a while since I worked with AIX last, but fuser -f </path/to/file> should give you this information (or you can install lsof).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

How can I keep certain characters from appearing in a filename?

hi i know this is irrelevant to the question above but i was wondering how to pt a restriction in the filename in linux. I want that it is impossible to add numbers into the filename, help will be rely great , thanx! This posting was initially given as a reply to an unrelated thread. It has been... (2 Replies)
Discussion started by: samirboss
2 Replies

2. AIX

Date not appearing when listing using ls -la

Hi everyone, this strange error suddenly popped up out of no where when I do a directory listing , the date part doesn't appear root@oradb:/backup>ls -la total 58069304 drwxr-xr-x 3 root system 4096 23 ▒▒▒ 21:56 . drwxr-xr-x 44 root system 1536 23 ▒▒▒ 21:47... (4 Replies)
Discussion started by: filosophizer
4 Replies

3. Shell Programming and Scripting

sendmail not appearing to ps

I am having trouble finding the process, or subsystem, sendmail running on our client's server. They are runnning AIX version 5.3.9.0. When I run "ps -ef | grep sendmail" I only get my current ps process as a match. Running "ps -ef | more" and wading through the results also does not show sendmail... (2 Replies)
Discussion started by: moviedude
2 Replies

4. Shell Programming and Scripting

User input appearing as *

Is there a way in a shell script to make an user input appears as * (like a password) ?? (2 Replies)
Discussion started by: ce9888
2 Replies

5. AIX

CRLF during SFTP transfer is appearing only in one server

Hello. I have got 3 unix boxes A B C. Box A is being used to prepare some reports. After the reports generation, Box A sftp the reports to Box B and Box C. When I look at the report in Box B and Box C. The reports are different. In Box B, I see using od -x command there is CRLF (\r\n) at the end... (7 Replies)
Discussion started by: panchpan
7 Replies

6. Cybersecurity

Strange files keep appearing in my home directory

Hi everyone, really strange files keep appearing in my home directory. I have absolutely no idea where they come from and I'm a little concerned that they could come from some kind of malware activity or Firefox exploit. I searched Google for parts of the file names but without a result. The... (6 Replies)
Discussion started by: schallstrom
6 Replies

7. UNIX for Dummies Questions & Answers

Escape Sequences appearing in scripts

I hope this question isn't too vague... i recently switched from RedHat to Solaris 10, and found that the parts of a script that copy files between directories no longer work because escape sequences are appearing at the start and end of the filenames being read #!/usr/bin/bash cd... (1 Reply)
Discussion started by: jwm-wm
1 Replies

8. Solaris

Mounted Slice not appearing

Hi friends.. Here is my problem.. I mounted a slice and make it permanent through entering the information in /etc/vfstab file ,,,but when i give df -kh ,,in the output the slice information is not appearing..but i can be able to open the mount point and access files as usual..I didn't give... (6 Replies)
Discussion started by: sdspawankumar
6 Replies

9. Solaris

Help - File Manager not appearing

First I have to admit that I am not an unix expert, but I do know some basic things about the file systems. Anywho, one of my users' File Manager is not showing up as it normally does upon login. When I run a "ps -ea" I see "dtfile" in the list, but it does not show up. It's not in any of the... (0 Replies)
Discussion started by: tdpearson
0 Replies

10. AIX

Randomly appearing control characters in text files

Hi, From some time, we have noticed that our ascii files have started corrupting due to the presence of some random control characters (^@, ^M, ^H, ^D). The characters appear randomly on any file after the process that creates the file finishes. If we rerun the process, the files re creates... (0 Replies)
Discussion started by: aakashahuja
0 Replies
Login or Register to Ask a Question