Skip to content

The ownership of the directory is not retained, and an empty directory cannot be uploaded #5221

@JYSVaddsoft

Description

@JYSVaddsoft

Expected behavior

I want to preserve the mode, ownership, timestamps of files and folders when executing copy commands and restoring, and also upload and download empty folders

Actual behavior

The mode, ownership, and timestamps of the files in the directory have been retained, but the mode, ownership, and timestamps of the folder have all changed, and an empty directory cannot be uploaded or downloaded

Steps to reproduce the behavior

mc cp -r --preserve /dir s3/t01/
mc cp -r --preserve s3/t01/ /dir

mc --version

  • (paste output of mc --version)
    mc version RELEASE.2025-05-21T01-59-54Z (commit-id=f71ad84bcf0fd4369691952af5d925347837dcec)
    Runtime: go1.24.3 linux/amd64
    Copyright (c) 2015-2025 MinIO, Inc.
    License GNU AGPLv3 https://www.gnu.org/licenses/agpl-3.0.html

System information

Linux ubuntu 5.4.0-205-generic #225-Ubuntu SMP Fri Jan 10 22:23:35 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions