minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.85k stars 547 forks source link

Attempt to overwrite an object in compliance mode fails with success #3193

Closed ebozduman closed 4 years ago

ebozduman commented 4 years ago

Expected behavior

When mc cp attempt to overwrite an object protected by retention setting, regardless of the mode (governance or compliance), is rejected for any reason, mc returns the correct error message, and the progress bar does not show up at all.

Actual behavior

First a clear and correct error message is displayed ,but it is followed by a complete progress bar, as if some copy has actually started and completed successfully.

Steps to reproduce the behavior

  1. $ mc ls myminio/bucket
  2. $ mc lock myminio/bucket GOVERNANCE mode is enabled for 2d
  3. $ mc cp /etc/issue myminio/bucket/ /etc/issue: 26 B / 26 B ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃ 3.26 KiB/s 0s
  4. $ mc cp /etc/issue myminio/bucket/ mc: Failed to copy /etc/issue. Object is WORM protected and cannot be overwritten /etc/issue: 26 B / 26 B ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃ 8.28 KiB/s 0s

mc --version

$ mc --version mc version DEVELOPMENT.2020-04-27T23-48-39Z

System information

$ MINIO_ACCESS_KEY=minio MINIO_SECRET_KEY=minio123 MINIO_REGION="us-east-1" minio server /var/tmp/data

kannappanr commented 4 years ago

@ebozduman Progress bar is removed in the case of multipart upload. This is showing up only for single PUT

harshavardhana commented 4 years ago

This is not useful anymore as we don't expect PUT or multipart to fail on versioned locked buckets. We should perhaps close bugs which we are not planning to fix.