Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read-only clarification #60

Open
CyprusSocialite opened this issue Jan 15, 2023 · 5 comments
Open

Read-only clarification #60

CyprusSocialite opened this issue Jan 15, 2023 · 5 comments

Comments

@CyprusSocialite
Copy link

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

@pali
Copy link
Owner

pali commented Jan 15, 2023

The purpose of mkudffs --read-only is 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
Copy link
Author

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
Copy link
Owner

pali commented Jan 15, 2023

You are right. I was planning to write some udftune tool (based on the the udflabel code) which can set different flags like this but I have not done it yet.

@pali
Copy link
Owner

pali commented Mar 4, 2023

If you are interested to write such tool, feel free to do it.

@jtru
Copy link

jtru commented 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 #62

I 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants