:: Re: [DNG] [OT] files disappearing r…
Forside
Slet denne besked
Besvar denne besked
Skribent: Florian Zieboll
Dato:  
Til: dng
Nye-emner: [DNG] Popcorn (was: Re: [OT] files disappearing reproducibly)
Emne: Re: [DNG] [OT] files disappearing reproducibly
On Sat, 19 Feb 2022 15:00:11 -0500
Ken Dibble <ken@???> wrote:

> I don't know if this error will show up in the logs or not.
>
> If your filesystem supports extended attributes (i.e. not zfs)
>
> -----
>
> $ touch cant_delete_me
>
> $ sudo chattr +i cant_delete_me
>
> $ rm cant_delete_me
>
> rm: cannot remove 'cant_delete_me' : Operation not permitted
>
> $ sudo rm cant_delete_me
>
> rm: cannot remove 'cant_delete_me' : Operation not permitted
>
> ---------
>
> See if the error message shows up in the logs.



Where would this error be logged? I just tested it:

florian@nulldevice:~$ touch ~/tmp/test_deletable
florian@nulldevice:~$ touch ~/tmp/test_undeletable

root@nulldevice:~# touch /home/florian/tmp/test_root
root@nulldevice:~# chattr +i /home/florian/tmp/test_undeletable
root@nulldevice:~# ls -l /home/florian/tmp/test*
  -rw-r--r-- 1 florian florian 0 Feb 19 21:11 /home/florian/tmp/test_deletable
  -rw-r--r-- 1 root    root    0 Feb 19 21:19 /home/florian/tmp/test_root
  -rw-r--r-- 1 florian florian 0 Feb 19 21:09 /home/florian/tmp/test_undeletable 
root@nulldevice:~# lsattr /home/florian/tmp/test*
  --------------e------- /home/florian/tmp/test_deletable
  --------------e------- /home/florian/tmp/test_root
  ----i---------e------- /home/florian/tmp/test_undeletable
root@nulldevice:~# rm /home/florian/tmp/test_undeletable 
  rm: cannot remove '/home/florian/tmp/test_undeletable': Operation not permitted
root@nulldevice:~# grep -R -e undeletable /var/log/
  [no results]


OTOH, all the files under '/home/florian/tmp/' are still there - at
least 'test_deletable' should have been gone by now, if "the issue"
still persisted... So I remain wondering (again [1]) if there's some
galaxy brain posing with its superpowers by trampling through my tiny
digital sandcastle here? (lol, get a life!)

But seriously, for the future(tm): Where would this 'chattr +i'-induced
"Operation not permitted" error be logged?

libre Grüße,
Florian


[1] see the issue with "nonpersistent block device names" in my
    "kernel-update: initramfs fails to find swap"-thread




-- 
      \
       \\
        \ \
    ____|  |________
  /                  \

 |   ILS SONT FOUS    |
 |    CES ROMAINS!    |

\__________________/