This is a low-level hardware solution as opposed to a permissions-based solution.
On a Unix system, you can use hdparm
to set SATA/IDE device parameters. One of those parameters is a read-only value.
Here is an example assuming your device is scsi device b (sdb):
Turn on read-only value (CAREFUL!)
hdparm -r1 /dev/sdb
Turn off read-only value
hdparm -r0 /dev/sdb
Read the current value
hdparm -r /dev/sdb
from man hdparm
-r Get/set device readonly flag (DANGEROUS to set)
-R Get/set device write-read-verify flag