Storage quotas
A storage quota limits how much space an account can use. FileRun refuses to store anything that would take an account over its limit.
Setting a quota
The limit is Space quota, next to the home folder Path in the permissions of the account. It is in
megabytes, and 0, the default, means no limit.
For an account that has a role, the quota is set on the role, in the same place, and applies to every account with that role. The superuser has no quota.
An independent administrator can give the accounts they manage quotas only within their own quota. See Administrator permissions.
A shared drive has a quota of its own, Space quota in the settings of the drive. What the members
store in a drive counts against the quota of the drive, not against their own quotas. See
Administering shared drives.
What counts
The usage of an account is everything in its home folder, plus everything in its trash.
- The trash counts, so emptying it frees space. See The trash.
- Old versions of files do not count, and neither do FileRun's own hidden
.filerun.folders. - A folder shared with the account counts for its owner. When a user uploads into a folder that somebody shared with them, the file counts against the owner's quota, and it is the owner's quota that can refuse it.
What happens at the limit
Anything that would add data beyond the quota is refused: uploads, new files, saving changes to a
file, copies, extracting an archive, creating a Zip archive, and moving items in from another account. The message says how much
space is needed and how much is left, or There is no more free space available!.
Lowering a quota below the current usage does not delete anything. The account keeps its files, and everything that would add data is refused until the usage drops below the new limit.
What users see
When an account has a quota, the interface shows the user how much of it is used.
WebDAV clients receive the quota as well, so they can show the free space.
The Storage usage report
Users → Storage usage lists the user accounts with their quota and their usage, in the columns
Name, Username, Quota, Used, Percentage used and Id.
The usage is calculated on request, because FileRun has to measure the folders: select an account to
calculate its usage, or click Calculate all. A percentage above the warning level is shown in red,
and so is the usage of an account that has reached its quota.
Warning users before they reach the limit
Users → Storage usage → Settings has one setting, Users quota warning level, a
percentage. The default is 90. With 0, no warning is sent.
The warning is not sent by itself. The space_quota_notifications.php command produces it, and you
have to schedule this command on your server. See Command line tools.
Each time the command runs, it adds the entry "Space quota warning" to the activity log of every account at or above the warning level. A warning e-mail also goes to the user of the account, when these conditions are met:
- The
Notificationsoption of the account is on, in theBasic infotab of the user window. In the account settings of the user, this option isSend me e-mail notifications. - The account has an e-mail address.
- The scheduled task
everyMinute.phpruns. This task sends the e-mail.
For a shared drive, the e-mail goes to the admin of the drive. The conditions above then apply to the account of the admin. When a drive has no admin, nobody receives the e-mail.
FileRun sends the e-mail at most once in each calendar week for each account, however often the command runs. A week starts on Monday. The entry in the activity log is added at every run, so a daily schedule is enough.
To check only one account, add --uid= and the ID of the account. The ID of an account is in the
Id column of the Storage usage list.
1php space_quota_notifications.php --uid=123