Skip to content

feat(trampoline): allow shared cache folder between users #3741

@fransua

Description

@fransua

Problem description

Hi,

To optimize resources, my coworkers and I would like to share the .cache/rattler folder across users in the same group. However, the permissions set by Pixi in this folder do not seem to respect the system's umask (which is 0002 in our case). As a result, group members are denied write access to files and directories created by other users, even though the group is correct.

I believe the root of the issue is here:

#[cfg(unix)]
{
use std::os::unix::fs::PermissionsExt;
tokio_fs::set_permissions(self.path(), std::fs::Permissions::from_mode(0o755))
.await
.into_diagnostic()?;
}
Ok(())
}

From what I can tell, std::fs::create_dir_all is used without adjusting permissions afterward, and the default mode of 0o755 ends up being applied regardless of the umask.

Could this be updated to either:
- explicitly apply 0o775 when creating group-shared directories
- or, ideally, respect the current process's umask when creating directories?

This would make sharing cache folders across users in the same group much easier and still safe.

Thanks!

François

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions