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

File Name restriction policy by case, whitelist and blacklist. #58

Open
glowingwire opened this issue Apr 29, 2024 · 0 comments
Open

File Name restriction policy by case, whitelist and blacklist. #58

glowingwire opened this issue Apr 29, 2024 · 0 comments

Comments

@glowingwire
Copy link

I would like to limit my filenames to be case preserving but prohibit files to be of alternative case, for compatibility with case insensitive operating systems.

I would also like to restrict the characters to valid unicode, and restrict characters that have control characters for terminals and characters used to trick people. I would block * \ and some other characters, and warn on some characters like - and ! and | the list is something I would like to be able to choose myself, and might compile lists or warnings based on characters being usable by terminals.

For files already on the volume, I would want to be able to let it go, throw an error or warning and possibly refactor the filename to be configurable to
display these characters as escaped code/unicode reference or similar , this to be determined by arbitrary list.

I would also want to be able to artificially limit the number of characters/bytes/ in a file name.

I imagine this would be modifiable by catting settings in something like /sys/filesystem/volume/subvolume/options/caseinsensitive
casepreserving
error_if_differs_by_case
restricttounicode
errorlist
warnlist
escape_non_ascii
maxfilenamebytes
maxfilenamechars

This might be something useful for more filesystems than just BTRFS,

When Linux gets made for the everyday user, inserting a usb drive and trying to edit a file shouldn't bork the system by just having a strange but valid filename, especially ones that the user cannot type.

I've had my terminal be goofed up by doing an ls in a folder. My end users should not have to experience that, and should be willing to pay to not have to deal with that.

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

1 participant