-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Hi!
This is not technically an 'Issue' but there really is nowhere else for me to ask.
I am struggling to understand how the --read-only option is supposed to work. It seems that using it will result in a new, empty and also immediately unwritable filesystem. What's the use, then?
Personally I am setting up some UDF partitions on my usb, and I would like to protect some of them from writing, but only after I've put some files there that can be read. Is there a way to accomplish this?
Thank you
Activity
pali commentedon Jan 15, 2023
The purpose of mkudffs
--read-onlyis to set into UDF filesystem "metadata" some flags which treat filesystem as readonly. I agree that this option as alone is not very useful. If there would be mkudffs option to put files/dirs during generating filesystem then it makes more sense (I was planning to implement this in past but I have not done it yet). Or if there is a tool which can set or clear those flags. Or if there was a tool which can put files into such filesystem and ignoring read-only flags. IIRC currently there no such tool is written yet.CyprusSocialite commentedon Jan 16, 2023
Just a guess, but doesn't udflabel edit metadata of existing UDF filesystems? So maybe the flag could be added/edited in a similar way...
pali commentedon Jan 16, 2023
You are right. I was planning to write some
udftunetool (based on the the udflabel code) which can set different flags like this but I have not done it yet.pali commentedon Mar 4, 2023
If you are interested to write such tool, feel free to do it.
jtru commentedon Apr 23, 2023
I am in need of this feature, and tried to scratch my own itch.
The most logical place (that already exists :)) for such a feature to implement is
udflabel(since it modifies the on-disc structure of existing UDF data) - so I did the least amount of work to make that support setting a UDF device/file system "read-only" after the fact in #62I hope you find this contribution useful, and will consider merging it :) If there's any changes you would suggest or require to do so, please let me know.