diff --git a/weed/s3api/s3api_acp.go b/weed/s3api/s3api_acp.go index ff771dc94..106f14d7d 100644 --- a/weed/s3api/s3api_acp.go +++ b/weed/s3api/s3api_acp.go @@ -255,8 +255,8 @@ func (s3a *S3ApiServer) checkAccessForWriteObjectAcl(accountId, bucket, object s return nil, nil, "", s3err.ErrAccessDenied } -func updateObjectEntry(s3a *S3ApiServer, bucket string, entry *filer_pb.Entry) error { - return s3a.updateEntry(util.Join(s3a.option.BucketsPath, bucket), entry) +func updateObjectEntry(s3a *S3ApiServer, bucket, object string, entry *filer_pb.Entry) error { + return s3a.updateEntry(util.Join(s3a.option.BucketsPath, bucket, object), entry) } // Check Object-Write related access diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go index efa3196c7..7d506e602 100644 --- a/weed/s3api/s3api_object_handlers.go +++ b/weed/s3api/s3api_object_handlers.go @@ -8,8 +8,8 @@ import ( "fmt" "github.com/aws/aws-sdk-go/service/s3" "github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants" - "github.com/seaweedfs/seaweedfs/weed/s3api/s3acl" "github.com/seaweedfs/seaweedfs/weed/s3api/s3account" + "github.com/seaweedfs/seaweedfs/weed/s3api/s3acl" "github.com/seaweedfs/seaweedfs/weed/security" "github.com/seaweedfs/seaweedfs/weed/util/mem" "golang.org/x/exp/slices" @@ -588,7 +588,7 @@ func (s3a *S3ApiServer) PutObjectAclHandler(w http.ResponseWriter, r *http.Reque return } - err := updateObjectEntry(s3a, bucket, objectEntry) + err := updateObjectEntry(s3a, bucket, object, objectEntry) if err != nil { s3err.WriteErrorResponse(w, r, s3err.ErrInternalError) return