Closed lancelui-amzn closed 1 month ago
It obeys the umask, which is unavoidable (without an additional call to chmod
) but should definitely be better documented. I.e., when you set 0o777
, you get 0o777 & ~0o022
(assuming your umask is the default 0o022
).
Hm. Actually, I think it should obey the umask but we have a test that disagrees. Let me look at that.
Ah, nvm. I misread the test. Yeah, it'll obey the umask and there's not much we can do about it (other than explicitly calling fs::set_permissions
ourselves).
See https://docs.rs/tempfile/latest/tempfile/struct.Builder.html#unix
I am trying to set permissions for the temp folder as
0o777
, butBuilder::permissions
sets it to0o755
. Can it not set write permissions? Currently usingfs::set_permissions
to do so as a work around.On tempfile version 3.12.0 with Amazon Linux 2.
playground demonstration