From 4f3dde34dc7959d697a70bb420fcae687518e11f Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 26 Jul 2024 20:08:52 -0400 Subject: [PATCH] Use 666 rather than 644 for default permissions (#5498) ## Summary I don't know why I used 644 here. 666 is the actual default: https://github.com/rust-lang/rust/blob/7c2012d0ec3aae89fefc40e5d6b317a0949cda36/library/std/src/sys/pal/unix/fs.rs#L1069 Closes https://github.com/astral-sh/uv/issues/5496. --- crates/uv-fs/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/uv-fs/src/lib.rs b/crates/uv-fs/src/lib.rs index 5f360fd66..7541e6f2f 100644 --- a/crates/uv-fs/src/lib.rs +++ b/crates/uv-fs/src/lib.rs @@ -103,13 +103,13 @@ pub fn replace_symlink(src: impl AsRef, dst: impl AsRef) -> std::io: /// Return a [`NamedTempFile`] in the specified directory. /// -/// Sets the permissions of the temporary file to `0o644`, to match the non-temporary file default. +/// Sets the permissions of the temporary file to `0o666`, to match the non-temporary file default. /// ([`NamedTempfile`] defaults to `0o600`.) #[cfg(unix)] pub fn tempfile_in(path: &Path) -> std::io::Result { use std::os::unix::fs::PermissionsExt; tempfile::Builder::new() - .permissions(std::fs::Permissions::from_mode(0o644)) + .permissions(std::fs::Permissions::from_mode(0o666)) .tempfile_in(path) }