Server: Directory-based quota

Created on 16 Oct 2016  路  10Comments  路  Source: nextcloud/server

Expected behaviour

A great new feature would be a directory-based quota. Which can be within the total quota limit, or can even be overwritten by any specific quota (even more than the total quota).

Actual behaviour

Only setting one total quota is possible.

1. to develop enhancement

Most helpful comment

It offers in combination with the already-existing and awesome features like External storage and File Access Control many new possibilities - some examples:

  • It allows to mount external storage like SMB with enabled server-side quota to set a quota on that directory. With some modifications in the Nextcloud core it would be possible to make Nextcloud itself and the user aware of the SMB-quota.
  • Administrators could create special folders to only allow to drop photos in: Creating File Access Control rules and setting a custom quota which even may exceed the users麓 quota.
  • Users could create and share folders with other users and assign a quota on the shared folder. So other users can't put files in till the users麓total-quota fills completely up.
  • Users could create public drop-in folders and assign a custom quota on that directory - within their total maximal quota. Administrators could be able to overwrite their total quota limits.

The first usecase is mainly the reason behind this feature request. By default Nextcloud is not counting the used space of external storages upon the users麓 quota, but beside that it may even be possible that the external storage have a server-side quota itself but Nextcloud is not aware about that.

So by implementing such a feature like directory-based quota it may be possible to use that functionality to make Nextcloud aware of that quota while offering the users even more flexibility to set custom quota on their own (shared) folders. This allows to prevent any misbehaviour/errors when trying to put files onto a external storage where the server-side quota is already exceeded.

All 10 comments

Could you share a usecase, Patschi, what is the problem you are trying to solve with this?

It offers in combination with the already-existing and awesome features like External storage and File Access Control many new possibilities - some examples:

  • It allows to mount external storage like SMB with enabled server-side quota to set a quota on that directory. With some modifications in the Nextcloud core it would be possible to make Nextcloud itself and the user aware of the SMB-quota.
  • Administrators could create special folders to only allow to drop photos in: Creating File Access Control rules and setting a custom quota which even may exceed the users麓 quota.
  • Users could create and share folders with other users and assign a quota on the shared folder. So other users can't put files in till the users麓total-quota fills completely up.
  • Users could create public drop-in folders and assign a custom quota on that directory - within their total maximal quota. Administrators could be able to overwrite their total quota limits.

The first usecase is mainly the reason behind this feature request. By default Nextcloud is not counting the used space of external storages upon the users麓 quota, but beside that it may even be possible that the external storage have a server-side quota itself but Nextcloud is not aware about that.

So by implementing such a feature like directory-based quota it may be possible to use that functionality to make Nextcloud aware of that quota while offering the users even more flexibility to set custom quota on their own (shared) folders. This allows to prevent any misbehaviour/errors when trying to put files onto a external storage where the server-side quota is already exceeded.

Anything new on this topic?

I guess the only 'news' is that as far as I can tell nobody is working on it (yet) ;-)

If this feature is triaged enough now, shouldn't be the label "1. to develop" assigned to it?

If this feature is triaged enough now, shouldn't be the label "1. to develop" assigned to it?

Same news as in December ... Nobody is working on it (yet). Changing the label will not change the state of development ... It is currently in triage, because none of the developers has yet thought over an implementation - or closer details :(

Oh, sorry! Then I understood the label "to triage" a bit wrong :) I thought it means, that it's still being considered if the dev team wants the feature within Nextcloud. (I interpreted "1. to develop"-label like "Feature request valid, anyone can start developing it now"-label :P)

My use case (NC12.0.0): An external WebDAV Folder is shared with a user group. I cannot set a per group quota and i cannot set a per folder quota, so every user can upload as much as he/she wants. The result is a completely filled WebDAV storage.
Am I missing something, is there another way to prevent this?

Such a feature would be very welcome. It seems to have been recently implemented in "groupfolders" app:
https://github.com/nextcloud/groupfolders/issues/17
Could not test it yet.

The Group folders app lets you set a total max quota on each folder and yeah, it would be possible I suppose to add a total quota to external storage, too. It would at least cover some of the needs for this.

But besides that, it is a complicated thing from what I can tell - both on how to define proper behavior (should you allow a user to exceed their quota? how does it count? Can users set a quota for others whom they share folders with? etc) and in terms of how to implement. It would probably require a serious amount of time and work, meaning it isn't likely somebody does it in their free time. Which would mean it probably requires a customer request to Nextcloud GmbH or a company to pay a third party to do it and get it upstream. I might be wrong, though - just sharing my thoughts to create realistic expectations :smile_cat:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

juliushaertl picture juliushaertl  路  3Comments

blackcrack picture blackcrack  路  3Comments

e-alfred picture e-alfred  路  3Comments

mama21mama picture mama21mama  路  3Comments

ghost picture ghost  路  3Comments