I followed the procedure mentioned in Using UDF on a USB flash drive and got myself an UDF formatted USB drive. Works like a charm.
I've read the specification for version 1.02 (the one I'm using: basically because it provides everything I need and nothing more, thus maximizing portability) and I think I remember reading something about "sessions" of sorts and them having independent read/write permission bits.
Now, I'd like to use these filesystem's facilities to achieve the following:
- The USB drive should have two "areas": a read/write area and a read-only area.
- The read-only area should work as if every single file within it were read-only itself (directories, properties, etc. included).
- There should be an "easy" way of turning the read-only area into a read-write area (and vice-versa), there's no problem if this needs administrative privileges.
In reality, these "areas" would be two different sessions, each consisting of a single folder (say, the "RW" and "RO" folders), in order to use the aforementioned mechanism of managing per-session permissions UDF offers (this is to avoid having to run a recursive chmod on the whole area).
By an "easy" way of turning the read-only area into a read-write one I mean modifying the session's permissions: this will most probably imply accessing the device directly and thus would require administrative privileges (which I don't mind).
I really have no clue how to even approach this problem, so any help will be greatly appreciated.