Skip to content

Add shared folder quota config policy #14600

Closed

Description

@luizluca

Hello,

I would be fantastic to have a way to configure the policy for shared folders. I see some different scenarios:

  1. "count on share creator": If user A shared folder F with user B, no matter who creates/modifies files inside folder F, user A quota is used
  2. "count on file creator": If user A shared folder F with user B, new files will count on creators quota.
  3. Scenarios 1. and 2. with limit: User A (or also B in 2.) can limit the max of its quota usage for the shared folder.

The scenario 3. can be abused to create shared folder quota that does not count on either users. For this, the admin (or a new dedicated user) can define its own quota to be unlimited (or large enough to fit all shared folder). Now admin adds a new folder and share it with users/group and opt for count all new files on its quota and limit this usage at some value. This would solve plenty of group/folder quota requests.

The problem is that other users (even others from admin group) would not have access to change the sharing settings). However, this could be workaround creating multiple dedicated account for every "admin domain" or sharing the folder with a group (and using the group admins to authorize new users). Anyway, it would still depend on "sharing a password" strategy (which is not ideal for large systems).

If we got a "Login as user feature" #14599, we could avoid the "shared password strategy", letting admin users login as the "sharing-folder-user".

I'm going on with the idea. Another idea would be to have something like a "group account" (with normal quota). This account will never login but it would be managed by the group admin users. Those users could login as the "group account" (again #14599), create folders and share them with other users/groups.

Activity

  1. PVince81 commented on Mar 1, 2015

    @PVince81
    Contributor

    File creator is currently not possible as OC doesn't have this information.

    So far you might have noticed that the quota works like your scenario 1.

    Still, thanks for the suggestions 😄

  2. luizluca commented on Mar 1, 2015

    @luizluca
    Author

    @PVince81 , and would a feature as "limit how much quota is used by shared folder" possible?
    It would avoid me creating dozens of fake users for each shared folder I want to specify a quota.

    As currently OC already calculates the shared folder quota based on the sharer free space, it would change:

    from:
    shared_folder_free_space = sharer_free_space
    to:
    shared_folder_free_space = min(shared_folder_quota - shared_folder_size, sharer_free_space)

  3. added this to the backlog milestone on Mar 6, 2015
  4. phil-davis commented on Aug 17, 2015

    @phil-davis
    Contributor

    I am about to create a bunch of "fake" users to achieve these aims:

    • FinanceGod - quota 10GB, create a Finance folder and share it with Finance group.
    • HRGod - quota 9GB, create a HR folder and share it with HR group.
    • ITGod - quota 8GB, create a IT folder and share it with IT group.
      ...

    This achieves the need that each department have a shared folder that has some quota that is enforced on the shared folder, but does not effect any particular real user's quota.

    If you create just 1 "fake" user and have it create and share all the department folders then everybody ends up effectively sharing a single "global" quota of space across all the shared folders.

    It is not so difficult to set up, but it does mean having a bunch of "fake" accounts for which the passwords have to be kept securely by whoever manages the scheme.

  5. c-hri-s commented on Jun 9, 2017

    @c-hri-s

    Hi,

    Did this behaviour change, because it (10.0.2) no longer seems to work like scenario 1, but works like scenario 2.

  6. phil-davis commented on Jun 12, 2017

    @phil-davis
    Contributor

    On server 10.0.2 it is working for me like scenario 1:
    a) create users a1 (1GB quota) and a2 (10MB quota)
    b) Login as a1, create "sharedfolder" and share with a2. Put some files in it of you like. Logout.
    c) Login as a2, try to upload some big files in your own folder(s) - it limits to 10MB total.
    d) Upload big files to sharedfolder, it lets you upload lots of stuff past 10MB.

  7. c-hri-s commented on Jun 12, 2017

    @c-hri-s

    It doesn't for me:

    I have two users, 'Chris' (the administrator) and 'Test.User'
    Set 'Test.User' to have a 1MB quota

    Shared a folder "APAC" to that user, owned by user 'Chris'
    Test.User synchronised 'APAC' to 'C:\Owncloud\APAC'

    If 'Test.User' adds 'ownCloud-2.3.2.6928-setup.exe' to 'C:\Owncloud' then they get the error:
    12/06/2017 10:46:04,ownCloud-2.3.2.6928-setup.exe,C:\Owncloud,Continue blacklisting: Error transferring [] server replied: Insufficient Storage (Sabre\DAV\Exception\InsufficientStorage)

    If 'Test.User' then adds 'ownCloud-2.3.2.6928-setup.exe' to 'C:\Owncloud\APAC' (the shared folder) they still get a quota error:
    12/06/2017 10:49:39,APAC/ownCloud-2.3.2.6928-setup.exe,C:\Owncloud,Error transferring [] server replied: Insufficient Storage (Sabre\DAV\Exception\InsufficientStorage)

  8. phil-davis commented on Jun 12, 2017

    @phil-davis
    Contributor

    Does it work by logging in the webUI as Test.User and uploading a file there?
    Maybe there is a difference between the server API endpoints that the webUI is using and what the oC client is doing.

  9. c-hri-s commented on Jun 12, 2017

    @c-hri-s

    Ah - yes you're right.

    Via the webUI it works as you describe.
    Via the client it works as I describe.

    Shouldn't it be consistent?

  10. phil-davis commented on Jun 12, 2017

    @phil-davis
    Contributor

    So they are likely using different APIs, and the one that the client uses does not work out the quota properly. If someone can confirm that then we know it is a core issue with one of the APIs.

    I also have a feeling that this sort of quota stuff has been discussed recently in client issues, but possibly more to do with user quotas on external storages/federated storages that are "hanging off the server backend" in some way - those also have difficulties with being able to reliably predict when a file will or will not fit within the quota/space on that storage.

  11. PVince81 commented on Jun 19, 2017

    @PVince81
    Contributor

    Since ownCloud 6 (or 7?) the shared folder quota is always the one of the share owner.

    I'm not aware of any intentional behavior changes in 10.0.2.

    We did touch some code related to quota to fix the users page to display the correct quota: #27895

  12. c-hri-s commented on Jun 19, 2017

    @c-hri-s

    If that's the case then it appears broken in 10.0.0.2 but only when uploading using the client as described above - the client shows an error and the file is not uploaded.

  13. PVince81 commented on Jun 19, 2017

    @PVince81
    Contributor

    @c-hri-s you're right, it seems the quota check doesn't work correctly when using the new DAV endpoint, which is used by the newer desktop client versions. Raised here #28159

  14. PVince81 commented on Jun 19, 2017

    @PVince81
    Contributor

    @phil-davis this can't be verified using UI only tests as the web UI uses the old DAV endpoint currently. Needs coverage on the API integration tests level.

  15. ted-strauss-K1 commented on Aug 21, 2017

    @ted-strauss-K1

    I am getting the same error as @c-hri-s describes above. I'm on OC 9.1.

    My user is unable to upload new data via the webdav folder.
    Is there any solution or workaround?

  16. PVince81 commented on Dec 15, 2017

    @PVince81
    Contributor

    There were some quota bugs in older 10.0 versions, please try again with 10.0.4.

    In general having different quota settings for different folders will likely confuse users and also whoever is configuring them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions