Protecting files
Protecting a file encrypts it and registers it with your installation. The person who protects a file owns it.
From the browser
Press Protect files at the top of any page. It takes you to Files with a drop box open: drop any number of files or folders, or click the box to choose. A few are handled at a time, and each appears in the list straight away with its progress. Close puts the box away.
Where the encryption happens is your administrator's choice (see Settings):
- On the user's device (the default). The browser makes the file key, encrypts the file, and sends only the encrypted form. The server never receives the readable file.
- On this server. The file travels over the connection's own encryption and is encrypted when it arrives. Only the encrypted form is kept.
Files protected from the browser are normally stored by the server, so the people they are shared with can view them in the browser. An administrator can change that, so that files are kept only where the person protecting chooses, or never on the server; see Settings.
From the command line
governate protect contract.pdf budget.xlsx
This writes contract.pdf.gvf and budget.xlsx.gvf beside the originals. The command-line tool always encrypts on the device. Many files are handled at once, one per processor by default; -j N changes that.
By default the server only receives the file's key, not the file: you move the .gvf yourself by email, a shared drive or any other way. Add -upload to also store the protected file on the server so that it can be viewed in the browser. A file protected without -upload can still be viewed later: whoever holds the .gvf drops it on the website, as described in Sharing and ownership.
Downloading
The owner of a file, and administrators, can download it in two forms from the file's page:
- Download original gives the file as it was before protection. The server decrypts the stored copy as it is sent.
- Download encrypted gives the
.gvf. It is safe to send anywhere; opening it still needs your installation's permission.
If the administrator has turned on stand-in files (see Settings), PDF and Office documents have a third form, Link only: a file that looks like the original and holds only a link to it.
People a file is shared with can download the original only if the owner allows it. Every download of an original is recorded.
Revoking
Revoke on a file's page, or governate revoke file.gvf, stops everyone from opening the file, the owner included. It cannot be undone.
What can be viewed in the browser
| Kind | Types | Shown by |
|---|---|---|
| Documents | Word, Excel, PowerPoint, OpenDocument, PDF, .csv, .rtf, common image formats | The document viewer |
| Text | .json, .yaml, .toml, .ini, .env, .xml, .html, .md, .txt, .log, .sql, shell scripts, and source code in the common languages | This website's own text page |
Any type of file can be protected; types that neither can show are opened with the command-line tool or downloaded.
Text files
Text files open in a plain editor with line numbers, coloured according to the kind of file. It needs no document viewer, so it works on an installation that has none.
- With the Edit permission (or as the owner) the text can be changed. Save, or Ctrl-S / Cmd-S, stores the change encrypted, for everyone. JSON has a Format button that lays it out one value per line.
- Markdown has a Preview button that shows it rendered, with headings, lists, tables and code blocks; Source switches back. Someone who can only read starts in the rendered form. Pictures are not fetched; their descriptions are shown instead.
- Without it the text is read-only.
- The watermark, the cover when the window is not in front, the limits on opens and dates, and the record of every open all apply as for documents.
- HTML is shown as its source text. It is never run.
- Files larger than 2 MB are not shown as text.
Copying textA document is drawn by the viewer and reaches the browser as pictures of pages. Text has to reach the browser as text to be shown. For a reader without the Copy and paste permission this page switches off selecting, copying and the right-click menu, which stops casual copying. It cannot stop a determined reader using the browser's own developer tools. Editing is different: a save from someone without the right is refused by the server whatever the page does.