CrushMFT Documentation

POSIX owner and permissions#

On macOS, Linux and Unix every file has an owner, a group, and permissions that say who may read and change it. Files that arrive through the server belong to the account the server itself runs as. The card POSIX OS X / Linux / Unix on the Misc tab of a user gives the uploads of that user another owner, group and permissions, so that other programs and people on the machine can work with them.

It does nothing on Windows, and nothing for storage that has no such thing, such as cloud storage.

The fields#

Field What it is Offered by Setup
Default owner the account of the machine that shall own what this user uploads www
Default group the group it shall belong to staff
Default file privs the permissions of uploaded files, as three digits 644
Default folder privs the permissions of folders the user makes 755

Setup asks for the four values one after another: "Enter OS X user name to set as owner:", "Enter OS X group name to set as group:", "Enter default permissions to set files to:", "Enter default permissions to set folders to:". Cancel at any question stops there and keeps what was answered before.

Empty fields change nothing: the files stay as the system made them.

The three digits#

Each digit stands for one of three parties, in this order: the owner, the group, everybody else. A digit is a sum:

Value Allows
4 reading
2 writing
1 running a file, or entering a folder
Privs Means
644 the owner reads and writes; group and others read
664 owner and group read and write; others read
640 the owner reads and writes; the group reads; others nothing
755 for folders: the owner everything; group and others may enter and list
775 for folders: owner and group everything; others may enter and list
770 for folders: owner and group everything; others nothing

Folders need the 1 to be entered at all: a folder with 644 is of little use.

What the server needs#

Giving a file to another owner is something only the system's administrator account may do. A server that runs as an ordinary account can set the group, to a group it belongs to itself, and the permissions, but not the owner.

  • Run the server as the account that shall own the files where you can; then no owner needs to be set.
  • Or let both the server's account and the other programs be in one group, set Default group to it, and use 664 and 775.

Per folder#

The same four values can be set for a single folder of a user, in the POSIX tab of Advanced in The VFS editor. What is set on the folder wins over what is set here.

The switches SITE CHMOD, SITE CHOWN and SITE CHGRP in Site preferences decide whether the user may change these things themselves.

Checking#

Upload a file as the user and look at it on the machine:

ls -l /path/to/the/folder

The line shows permissions, owner and group. If they did not change, look in the server log: a refused change is written there with the reason the system gave.