I want to lock a file(or read-only) so that anybody on server can't modify it. I find
chattr command on Linux but I didn't use it for some reason.
I am using
mount --bind file.log file.log, but after some day I need to unlock this file and use
umount -l and
rm -rf file.log but show this error
Device or resource busy.
When I reboot the server problem seems to be solved after reboot. Can you help me without reboot solve this problem?