I want to create a directory which is
undeletable
, and that you can only add files, not delete any file therein.
I was reading the man chattr
page and I came across attribute a
>A file with the 'a' attribute set can only be opened in append mode for writing. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
But it just mentions files. Can I apply it to a directory? Something like
sudo chattr +a +u /path/to/dir
Asked by João Pimentel Ferreira
(870 rep)
Mar 31, 2022, 07:45 PM
Last activity: Feb 19, 2023, 06:02 PM
Last activity: Feb 19, 2023, 06:02 PM