Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Unable to delete files. Files have strange ownership and permissions

    Posted on

    Not sure how those files came in or how their pemissions became so. I am trying to delete them but no luck. Any ideas on them would be much appreciated.

    [root@com01 sophos-av]# ls -l
    total 4
    drwxrwxrwx. 2 root root 4096 Dec 21 05:07 rms
    [root@com01 sophos-av]# ls -l rms/
    ls: cannot access /proc/3344: No such file or directory
    ls: cannot access /var/log/wtmp: No such file or directory
    total 0
    -????????? ? ? ? ? ? /proc/3344
    -????????? ? ? ? ? ? /var/log/wtmp
    [root@com01 sophos-av]#
    [root@com01 sophos-av]#
    [root@com01 sophos-av]# rm -rf *
    rm: cannot remove `rms': Directory not empty
    [root@com01 sophos-av]# cd rms
    [root@com01 rms]# ls -lai
    ls: cannot access /proc/3344: No such file or directory
    ls: cannot access /var/log/wtmp: No such file or directory
    total 8
    131105 drwxrwxrwx. 2 root root 4096 Dec 21 05:07 .
    131079 drwxr-x--x. 3 root sophosav 4096 Dec 21 03:45 ..
    ? -?????????? ? ? ? ? ? /proc/3344
    ? -?????????? ? ? ? ? ? /var/log/wtmp

    They dont have inode numbers so that failed. I tried to delete the parent dir using inode number, didnt help. It gave "no such file" for the files underneath.

    Here is the strace output if that helps:

    [root@com01 rms]# strace rm -rf *
    execve("/bin/rm", ["rm", "-rf", "/proc/3344", "/var/log/wtmp"], [/* 28 vars */]) = 0
    brk(0) = 0x833000
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f14c7f000
    access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY) = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=49881, ...}) = 0
    mmap(NULL, 49881, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7f14c72000
    close(3) = 0
    open("/lib64/libc.so.6", O_RDONLY) = 3
    read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\356!\3637\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=1930416, ...}) = 0
    mmap(0x37f3200000, 3750184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x37f3200000
    mprotect(0x37f338a000, 2097152, PROT_NONE) = 0
    mmap(0x37f358a000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18a000) = 0x37f358a000
    mmap(0x37f3590000, 14632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x37f3590000
    close(3) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f14c71000
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f14c70000
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f14c6f000
    arch_prctl(ARCH_SET_FS, 0x7f7f14c70700) = 0
    mprotect(0x37f358a000, 16384, PROT_READ) = 0
    mprotect(0x37f2c1f000, 8192, PROT_READ) = 0
    munmap(0x7f7f14c72000, 49881) = 0
    brk(0) = 0x833000
    brk(0x854000) = 0x854000
    open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=99164480, ...}) = 0
    mmap(NULL, 99164480, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7f0eddc000
    close(3) = 0
    ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
    lstat("/", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
    newfstatat(AT_FDCWD, "/proc/3344", 0x835350, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
    unlinkat(AT_FDCWD, "/proc/3344", 0) = -1 ENOENT (No such file or directory)
    newfstatat(AT_FDCWD, "/var/log/wtmp", 0x835470, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
    unlinkat(AT_FDCWD, "/var/log/wtmp", 0) = -1 ENOENT (No such file or directory)
    close(0) = 0
    close(1) = 0
    close(2) = 0
    exit_group(0) = ?
    +++ exited with 0 +++

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat