Linux: How to Make File Cannot be Deleted

The command is:

chattr +i filename

And to disable it:

chattr -i filename

From man chattr:

A file with the i attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.


source: serverfault

Artikel terkait:   Elementary OS Freya - Fix for Cannot Connect to NAS

Isi Komentar

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

÷ two = one

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top