Skip to content

Object Lock

Object Lock keeps files in a bucket from being erased for as long as you say. macSCP offers three things, all of them on a bucket that already has Object Lock:

WhatWhereApplies to
Default retention for the bucketConnection Actions → Object Lock…Files added to the bucket after it is set.
Retention for one fileRight-click a file → Retention…That file.
Legal hold for one fileRight-click a file → Legal Hold…That file.

Object Lock can only be switched on when a bucket is created, with the Object Lock switch in the Create Bucket sheet. macSCP does not switch it on for a bucket that already exists, and nothing switches it off again. A bucket with Object Lock also keeps versioning on for good.

On a bucket without it, each of the sheets below says: “Object Lock is not switched on for this bucket, so nothing in it can be locked. macSCP does not switch it on for a bucket that already exists; it can be chosen when a bucket is created.” Its button stays off.

A retention is a lock that runs until a date. It has one of two modes:

ModeWhat it means
Governance”Someone with the right permission can shorten or remove a governance retention, but not from macSCP.” In macSCP you can extend a Governance retention but not shorten it; to shorten or remove one, use a tool and an account that has the permission.
ComplianceCannot be shortened or removed by anybody until the date has passed. See the box above.

macSCP has no action that removes a retention or shortens one that is in force. If you try to shorten one, the store refuses and the sheet says: “The change was refused. Either a retention that is already in force cannot be shortened from macSCP, or your access key is not allowed to change it.”

Select one file in the remote pane (not a folder) and choose Retention… from its context menu. The sheet is titled “Retention for “…”” with the file’s name.

  1. The sheet reads the file and shows where it stands: “This file has no retention.” or “Current retention: Governance, until …”.
  2. Choose the Mode. Governance is selected to begin with.
  3. Pick the date and time under Keep until. It starts a week from now, or at the date of the retention already in force if that is later. It must still be ahead: “The date and time you chose have passed. Choose a date and time that is still ahead.”
  4. Press Set Retention. The sheet confirms with “Saved.” and shows what the store now holds.

When you choose Compliance, the explanation turns red: “Compliance cannot be undone. Once it is saved, nobody can erase this file’s stored data or shorten the retention until the date below has passed — not you, not the account owner, not an administrator.”

Set Retention stays off until you tick the box that repeats it with the date you picked:

I understand that nobody, including me, can erase this file’s stored data or shorten this retention before the date and time, and that this cannot be undone.

The tick belongs to that mode and that date. Change either one and the box clears, so you cannot confirm one date and save another. Saving spends the tick: a second Compliance retention needs a second confirmation.

A file that already has a Compliance retention in force cannot be changed to Governance. The sheet says: “This file has a Compliance retention that is still in force. It cannot be changed to Governance until it has run out.”

Select one file and choose Legal Hold…. The sheet is titled “Legal Hold for “…”” and shows whether the file is under a hold. Tick or clear Keep this file under a legal hold; the button reads Place Legal Hold or Lift Legal Hold to match.

“A legal hold keeps the file’s stored data from being erased until the hold is lifted. It has no end date and can be lifted at any time.” A hold is reversible, so it has no confirmation box. If the file is already as you set it, the button stays off: “The legal hold is already set this way, so there is nothing to change.”

The two sheets are separate on purpose: the retention sheet cannot change a hold and the hold sheet cannot change a retention.

Choose Connection Actions → Object Lock… while the remote pane is inside the bucket. The sheet is titled “Object Lock default for “…”” and shows the current default, or “This bucket has no default retention.”

  1. Choose the Mode, Governance or Compliance. The sheet starts on the bucket’s current default, or on Governance and 30 days when there is none.
  2. Enter the Retention period in days, from 1 to 36500.
  3. Press Save Default.

“The default applies to files added after it is set. Files already in the bucket are not changed.” Each file added later is locked for that many days. A bucket you did not set up yourself may already have a default: if creating a bucket finds one, macSCP says so.

For Compliance the same rule holds as for a file, with a larger reach: it applies to every file added to this bucket from now on, and nobody can erase one or shorten its retention until its days are up. The sheet shows the warning in red and asks for a tick: “I understand that nobody, including me, can erase the stored data of any file added to this bucket from now on for the number of days set above, and that this cannot be undone. A file added now stays locked until the date.” If the day changes while the sheet is open, the tick is no longer valid for the new date and the sheet asks you to untick and tick it again.

If the bucket already has this default, the button stays off: “The bucket already has this default, so there is nothing to change.” macSCP has no action that removes a default.

Changing a file’s metadata in a Compliance bucket

Section titled “Changing a file’s metadata in a Compliance bucket”

Saving a file’s metadata writes a new version, and in a bucket whose default is Compliance that version receives the retention. The metadata sheet refuses to save until you tick a confirmation that names the date.

  • “Object Lock could not be read.” or “The change could not be saved.” — the request failed.
  • “Your access key is not allowed to read or change this.” — the access key lacks the permission.

Every change, including a refused one, is written to the audit log as Object Lock changed. A retention’s entry names the mode and the date, a legal hold’s whether it was placed or released, and a bucket default’s the mode and the number of days.