mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Create ld.so.conf file with permissions 644
By default, temporary files are created with permissions 600 and this means that the files created when updating the ldcache are not readable in non-root containers. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -135,5 +135,10 @@ func (m command) createConfig(root string, folders []string) error {
|
||||
configured[folder] = true
|
||||
}
|
||||
|
||||
// The created file needs to be world readable for the cases where the container is run as a non-root user.
|
||||
if err := os.Chmod(configFile.Name(), 0644); err != nil {
|
||||
return fmt.Errorf("failed to chmod config file: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user