Topic: Disable writing when usb not mounted ?
in usb storage wiki there is this section:
Disable writing when not mounted
You may create an empty file to indicate that the disk is not plugged in so that you don't put files directly onto NAND by doing
chmod 444 /mnt/usbstorage -R
but root can still write to this folder if device is not mounted,right?
and if the folder is shared over nfs while device not plugged in and I write to it my NAND will explode, right?
so how do you really prevent this from happening? I may plug off the device here and there and if I forget to plug it in before I write to the folder over nfs I may be in problems.
maybe use chattr? which does not exist in openwrt.