# Permissions

Every item of a [VFS](VFS.md) has permissions: what the user may do in that folder. They are set with the switches beside the item in [the VFS editor](Users-Setup-VFS-Editor.md).

## The permissions

| Permission | Stored as | Allows |
|---|---|---|
| **Download** | `(read)` | getting files |
| **Upload** | `(write)` | putting files in, and replacing files |
| **View** | `(view)` | listing the folder |
| **Delete** | `(delete)` | deleting files |
| **Delete Folder** | `(deletedir)` | deleting folders |
| **Create Folder** | `(makedir)` | making folders |
| **Rename** | `(rename)` | renaming and moving |
| **Resume Transfers** | `(resume)` | going on with a broken upload or download, and appending to a file |
| **Share/Publish** | `(share)` | sharing files and folders with others |
| **Slideshow** | `(slideshow)` | viewing pictures as a slide show in the web interface |
| **Make Invisible** | `(invisible)` | nothing: it hides the item from listings. It still works for somebody who knows its path. |
| **Replicate** | `(replicate)` | nothing for the user: changes here are passed on by [VFS replication](Prefs-Replication.md#vfs-replication) |
| **Locked** | `(locked)` | nothing: it protects the item itself. The user cannot delete, rename or replace the folder the item stands for; what is inside follows the other permissions. |

Beside the switches an item carries a quota, a comment, and the settings of [Advanced](VFS-Advanced.md); they are stored in the same text, such as `(quota2147483648)`.

## How they combine

Some actions need two permissions:

| Action | Needs |
|---|---|
| continuing a download | Download and Resume Transfers |
| continuing an upload, appending | Upload and Resume Transfers |
| replacing a file | Upload. Where **Delete** is missing, see the server's overwrite rules in [Restrictions](Prefs-Restrictions.md). |
| moving a file to another folder | Rename where it is, Upload where it goes |
| seeing a file's size and date | View or Download |

**View** and **Download** are independent. Download without View is a blind folder: nothing is listed, and a file can be fetched by a user who knows its name. Upload without View and Download is a drop box: users put files in and cannot see or get what others put there.

## Down the tree

Permissions hold for the item and for everything below it. A folder further down can have permissions of its own:

1. In the editor, go down into the item on the user's side and select the folder.
2. Set its switches. A small flag marks the permissions that are set on this very folder.
3. **Inherit / Reset** removes them again; the folder then follows the one above.

A user so can have a read-only tree with one folder they may upload to.

The permissions that count for a path are those of the nearest folder above it that has any. They are not added up: a subfolder with only **View** is view-only, whatever the item above allows.

## Typical sets

| Purpose | Permissions |
|---|---|
| read-only | Download, View, Resume Transfers |
| upload only, a drop box | Upload, Resume Transfers |
| upload and see what is there | Upload, View, Resume Transfers |
| full use | everything but Delete Folder, or everything |
| a home folder | everything, and **Locked** so that the folder itself stays |

## From several sources

A user's VFS is put together from their own items and those they inherit. When the same path has permissions from more than one of them, the user's own count first, then those of the templates in the order of **Manage Inheritance**: see [Inheritance](Users-Inheritance.md).

## What permissions do not do

- They are about the user, not about the server's own account on the disk. A folder the server's system account cannot write to stays read-only, whatever is ticked here.
- On a remote item, the other system's own rules come first: an SFTP account that may only read stays read-only.
- File names are a separate matter: see [File filters](Users-Misc-File-Filters.md).

To see what a user really ends up with, log in as that user, or use **Test** on the item.
