Skip to content

feat(fscache): add umask for file and dir permission control - #37

Open
twpayne wants to merge 1 commit into
bartventer:masterfrom
twpayne:fscache-umask
Open

feat(fscache): add umask for file and dir permission control#37
twpayne wants to merge 1 commit into
bartventer:masterfrom
twpayne:fscache-umask

Conversation

@twpayne

@twpayne twpayne commented Aug 1, 2026

Copy link
Copy Markdown

Firstly, thank you very much for this very nice library!

I'm using this library for a per-user cache in chezmoi. I'd like to ensure that all files and directories created by the fscache store are only readable by the user who owns that cache.

This PR adds a fscache.WithUmask / ?umask= option to fscache that allows the application to exclude permissions from files and directories created by fscache. For example, fscache.WithUmask(0o077) will ensure that the created files and directories never have group or world read/write/execute permissions.

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

Successfully merging this pull request may close these issues.

1 participant