tempfile icon indicating copy to clipboard operation
tempfile copied to clipboard

Please support creating temporary directories with mode 0700

Open joshtriplett opened this issue 6 years ago • 2 comments

tempfile creates temporary files with mode 0600, but doesn't seem to restrict permissions on temporary directories at all. I'd like to create a temporary directory with mode 0700 (and not rely on the current umask to restrict write access). Ideally, I'd like tempfile to do so by default, for security reasons; if there's some reason the default permissions can't change, then I'd like to have an option to set them.

joshtriplett avatar Jan 26 '20 20:01 joshtriplett

See https://github.com/Stebalien/tempfile/pull/61. Basically: needs implementation.

Stebalien avatar Jan 27 '20 23:01 Stebalien

I also have a usecase where explicitly setting the permission mask (0664 in my case) without relying on the default umask would be helpful. I think that having a new setter method on the builder, taking a proper Pemissions argument, would be great. #61 is not currently going in that direction due to shortcomings on non-Linux platforms.

lucab avatar Jul 16 '20 16:07 lucab

Implemented.

Stebalien avatar Feb 05 '24 18:02 Stebalien