Want to make your file Immutable? Lock it down with (chattr +i) and keep your files untouchable! 🔒💻
Nurul Islam Rimon

Nurul Islam Rimon @nurulislamrimon

About: Thanks for being here! I'm Nurul Islam Rimon, a MERN & PERN stack developer. I'm a student of competitive programming. I love to explore new technology.

Location:
Chaprashirhat, Kabirhat, Noakhali
Joined:
Jan 20, 2024

Want to make your file Immutable? Lock it down with (chattr +i) and keep your files untouchable! 🔒💻

Publish Date: Feb 13
0 0

Make your file Immutable to prevent unwanted overwrite.

chattr +i /your-file-path.txt
Enter fullscreen mode Exit fullscreen mode

It will change your file's attribute. So you can check the attribute using the command below:

lsattr /your-file-path
Enter fullscreen mode Exit fullscreen mode

If ---i---- exist, that means immutable attribute added.

It could save you from some cron job also. Last time I resolved my Nginx configuration overwrite by HestiaCP issue through the approach.
Have a good day!

Comments 0 total

    Add comment