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:   How to Fix File Association for Windows 7

Isi Komentar

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

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