Close

use chattr to lock file

chattr

This command can be used to lock a file.

usage: chattr +i filename

The files locked by chattr cannot be modified or deleted, even with root permission.

For unlocking, use chattr -i filename.

Leave a Reply

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

%d bloggers like this: