1 Answer
If a file called test is created, to protect that file, run the below command,
# chattr +i test
Now this file is read-only file. Cant able to write or remove including for root user.
To view the permissions, use lsattr command.
To remove the permission which is set, just give - instead of + in that command.
# chattr -i test
Your Answer
x