File metadata and access list
A file in a bucket carries a few descriptive settings next to its content: what kind of file it is, how long a browser may keep a copy, and any notes of your own. macSCP shows and changes them in one sheet, and shows below them who has access to the file. Both work only on S3 connections.
Choose Metadata… from a file’s action menu in the remote pane. The sheet is titled “Metadata of “…”” with the file’s name, and says “Reading the file’s metadata…” while it loads. If the metadata cannot be read, it says “The file’s metadata could not be read.”
The metadata
Section titled “The metadata”| Field | What it holds |
|---|---|
| Content-Type | The kind of file, which a browser or another program uses to decide how to treat it. |
| Cache-Control | How long a copy of the file may be kept before it is asked for again. |
| Content-Disposition | Whether a browser shows the file or offers it as a download, and under what name. |
| Custom metadata | Any number of pairs of a Name and a Value, for notes of your own. Add Pair adds a row, Remove Pair removes one. A file without any says “This file has no custom metadata.” A value may hold any text, accents and other scripts included; a name may not (see When Save is refused). |
Saving replaces; it does not patch
Section titled “Saving replaces; it does not patch”The sheet says it on its face: “Saving replaces all of this file’s metadata with what is shown here. An empty field is removed.”
Pressing Save writes the whole set exactly as the sheet shows it. It does not change single fields and leave the rest alone. A field you leave empty is dropped from the file, and so is a pair you removed. Read the sheet as the complete new metadata of the file, because that is what it becomes.
A new version, where the bucket keeps versions
Section titled “A new version, where the bucket keeps versions”Changing a file’s metadata means writing the file again. In a bucket that keeps versions, the save therefore adds a new version:
This bucket keeps versions, so saving adds a new version of this file. The earlier versions stay as they are.
Where macSCP could not find out whether the bucket keeps versions, it says that instead of guessing: “macSCP could not confirm whether this bucket keeps versions. If it does, saving adds a new version of this file.” The new version appears in the version history like any other.
A Compliance default needs your acknowledgement
Section titled “A Compliance default needs your acknowledgement”In that case the sheet shows a warning: “This bucket’s default retention is Compliance, and the new version this change adds receives it. Nobody can erase that version’s stored data or shorten its retention before the date below — not you, not the account owner, not an administrator. This cannot be undone.”
Save is refused until you tick the box beneath it:
I understand that nobody, including me, can erase the stored data of the new version this change adds, and that this cannot be undone. The new version stays locked until the date.
The box names the date the new version stays locked until. It belongs to the retention macSCP read: if the retention changes while the sheet is open, the tick is no longer valid and you have to tick it again. For what Compliance means in general, see Object Lock.
When Save is refused
Section titled “When Save is refused”macSCP does not send a save it can see is wrong, and says why in the sheet:
- “Nothing has changed, so there is nothing to save.” Change something first.
- “Give every custom pair a name.” Name the pair or remove it.
- “A custom name may use only the letters A to Z without accents, digits and these characters: ! # $ % & ’ * + - . ^ _ ` | ~” Take any other character out of the name.
Größeis refused,Groesseis fine. - “macSCP adds the prefix a custom name needs on its own. Type the name without “x-amz-meta-”.” Remove the prefix from what you typed.
- “Two custom pairs have the same name. Names do not distinguish upper and lower case.” Rename or remove one.
- “Content-Type takes plain text only, without accents or other special characters.” The same sentence names Cache-Control or Content-Disposition when the problem is there. Take the accented or special characters out of that field.
The duplicate-name rule is easy to miss: Author and author are the same name. macSCP says so before you save, not after.
What “saved” means
Section titled “What “saved” means”A save that macSCP reports as done has been read back from the storage and confirmed. macSCP does not report a write it could not confirm.
The access list
Section titled “The access list”Below the metadata the same sheet shows an Access list: who owns the file, and who holds which permission on it.
Not every storage answers the same way, and the sheet says which case you are in:
| What the sheet says | What it means |
|---|---|
| ”Reading the access list…” | The list is being read. |
| ”This storage does not offer access lists for files.” | The storage you are connected to has no such lists, so there is nothing to show. |
| ”Your access key is not allowed to read this list.” | Your key may not read the file’s list. |
| ”The access list could not be read.” | The request failed. |
| ”The access list has no entries.” | The list was read, and nobody is on it. |
| ”The storage did not name an owner.” | The storage answered without saying who owns the file. |
| ”The storage did not name who holds this permission.” | An entry names a permission but not who holds it. |
The last two are not errors. Some storage answers without names, so a list does not always read as a list of people. Where the storage gives an identifier for an entry, the sheet shows it as “Identifier: …”.