Answer the question
In order to leave comments, you need to log in
How to prevent writing files to a USB drive (read-only) from under Linux?
There is a flash drive with information. Since it is used on client machines (of various industries and activities), it is necessary to set write protection on it. Is it possible to do this from under Linux? Set write permissions, or something else. The option described here is not suitable.
Thanks in advance for any help.
Answer the question
In order to leave comments, you need to log in
Programmatically, no way. Rights can save only partially (they will not save you from the root). You can tunefs
add a default mount option by adding ro
. But this only works on kernel 4.0 and above.
If I were you, I would take SD / microSD, they have a physical RO switch (not all).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question