mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Embed file in ZIP with custom permissions (#17954)
This change enables embedding files in ZIP with custom permissions. Also uses default creds for starting MinIO based on inspect data. Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
This commit is contained in:
@@ -297,7 +297,7 @@ func (sys *NotificationSys) DownloadProfilingData(ctx context.Context, writer io
|
||||
profilingDataFound = true
|
||||
|
||||
for typ, data := range data {
|
||||
err := embedFileInZip(zipWriter, fmt.Sprintf("profile-%s-%s", client.host.String(), typ), data)
|
||||
err := embedFileInZip(zipWriter, fmt.Sprintf("profile-%s-%s", client.host.String(), typ), data, 0o600)
|
||||
if err != nil {
|
||||
reqInfo := (&logger.ReqInfo{}).AppendTags("peerAddress", client.host.String())
|
||||
ctx := logger.SetReqInfo(ctx, reqInfo)
|
||||
@@ -325,11 +325,11 @@ func (sys *NotificationSys) DownloadProfilingData(ctx context.Context, writer io
|
||||
|
||||
// Send profiling data to zip as file
|
||||
for typ, data := range data {
|
||||
err := embedFileInZip(zipWriter, fmt.Sprintf("profile-%s-%s", thisAddr, typ), data)
|
||||
err := embedFileInZip(zipWriter, fmt.Sprintf("profile-%s-%s", thisAddr, typ), data, 0o600)
|
||||
logger.LogIf(ctx, err)
|
||||
}
|
||||
if b := getClusterMetaInfo(ctx); len(b) > 0 {
|
||||
logger.LogIf(ctx, embedFileInZip(zipWriter, "cluster.info", b))
|
||||
logger.LogIf(ctx, embedFileInZip(zipWriter, "cluster.info", b, 0o600))
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user