I want to mount a file as read-only and anybody cant write to this file.
I research in internet and find some commands:
mount -o remount,ro /dev/sda6 /srv/html
and
mount -o remount,rw /dev/sda6 /srv/html
but this for file system and partitons.
How to mount a file as read-only?
Thank you.
chattr +i /path/to/file
– Nehal J Wani Aug 12 '16 at 12:04