You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shared Files filesize subtracted from quota + fix/patch #2796
@DeepDiver1975 i wanted to avoid having to do all the git stuff, as i am not really programming these days. it will take some time for me to get accustomed to it.
The problem still occurs here with v5.0.7 installed from the Ubuntu 13.04 packages: shared files use the quotas of the owner and the users the files are shared with. Is this a regression? It seems the fix was released at version 5.0.5, but I have never used ownCloud before 5.0.7.
@VicDeo@bantu any free time at the moment to take a look? Please evaluate if #2804 is a possible solution.
In addition: please test the quota with mounted storages
@bantu hehe - good point - we need a clear definition of quota actually.
From my understanding the quota should only apply to the users primary local dataspace (stuff under /data/${user}/files).
Shared files are not to be counted.
Same for external mounted file systems - we actually might need another quota on external storages
I completely agree with how @DeepDiver1975 describes storage management should work. Because files shared with me are not duplicated onto my storage, it should not take away from that. Same for external storages – the data is never duplicated onto my storage either.
While versions and deleted files reside on my storage, they are »shadow files« which will make way for actual data once it’s needed. Hence no need to visualize or inform that I think. (At least not at this point.) cc @schiesbn – but most definitely, versions and deleted files do not count towards storage use either.
For now, as long as we are consistent, I agree with @jancborchardt . As shadow files do not count against quota, we should keep that behavior. However, there are circumstances where you do want them to count against quota. What I would LOVE is a configurable option - so that it can be set by the administrator at the site level in the admin panel.
Example: For this instance of ownCloud, quota should: include files shared with me; only include files I own.
We also have the sticky problem of whether external storage counts against quota or not - but this is an issue to solve later.
However, there are circumstances where you do want them to count against quota.
What are those circumstances? Because if it a file is not actually on the hard drive space reserved for me, it does not seem to make sense to act like it is.
Especially because it is so certain to determine »does this file reside on my storage: yes or no?« (or is it?) a preference seems like making it more complicated than it actually is – which is just having it in the code.
In our configuration we have a group that contains ALL users. If one of our 1800 users would choose to share a file
of 1GB with that group. Nobody would be able to use it. I would consider this a DoS ;-)
Indeed, at the moment I can't put files onto my owncloud storage, because someone shared his maximum amount of storage (1 GB) with me. I only have 10 MB in use and still my quota is exceeded. It should only count the files that you own.
Its not clear to me if there is a short term plan to fix the current bug of shared storage counting against an individual's quota. The fact, referenced many times in these threads, that you can go over your quota without ever adding a file, shows that quotas are unusable. I've looked at all the references and it seems that fixes aren't planned until OC6 or OC7.
I think it shouldn't be possible for people to "pollute" your storage.
Also, if user1 has 1 GB quota and user2 has 1 GB quota, and the total hard disk space is 2 GB. Currently if user2 shares 1 GB with user1, user1 won't be able to upload anything, which means that 1 GB hard disk space will be available forever, wasted.
Can we make the "not counting /Shared" in a user's quota the default ? The switch (if easy to add) will switch it back to the current behavior.
I'll have a look how difficult it is to implement as it is affecting another fix of mine.
I've done some tests to try and check all use cases and see whether they work consistently with the idea that the file/dir owner is the one whose quota is affected.
Case A: Regular quota without sharing.
✅ Works
Case B: File sharing
user1 shares file F with user2.
Size of file F counts in user1's quota.
✅ Works in OC6.
Case C: Shared dir with write permissions
user1 shares directory D with user2.
user2 uploads file F into directory.
I have made some more tests with reshared folders with write permissions and there are no difference from shared regular shared folders.
Some of the problems with max upload size and notifications are fixed with #5387 but I have found that it still shows your remaining quota for uploads in shared folders with write permissions (owner remaining quota should be used there).
Also found that after creating a user with quota it takes some time until it is applied and until then the user quota is 0b
The first time I was even able to go to personal preferences and there it was a 0 of ? too but after rebasing to lastest master I can only reproduce this issue.
Yes, I'm aware of these issues. Unfortunately still too many to fix.
I'll have a look at the quota calculation related to share folder in #5697.
The issue from your screenshot should be fixed by #5684
The quota calculation is based on the size of the root folder in the database. If that one is either wrong or set to -1 (during a scanning process), then the quota will be either wrong or 0.
Activity
DeepDiver1975 commentedon Apr 8, 2013
@tron65 can you please submit a pull request? THX
Niduroki commentedon Apr 8, 2013
#2504
tron65 commentedon Apr 9, 2013
@DeepDiver1975 i wanted to avoid having to do all the git stuff, as i am not really programming these days. it will take some time for me to get accustomed to it.
anyway, pull request submitted
BernhardPosselt commentedon Apr 9, 2013
Please reopen if #2804 didnt fix it for you
gpothier commentedon Jun 12, 2013
The problem still occurs here with v5.0.7 installed from the Ubuntu 13.04 packages: shared files use the quotas of the owner and the users the files are shared with. Is this a regression? It seems the fix was released at version 5.0.5, but I have never used ownCloud before 5.0.7.
tron65 commentedon Jun 12, 2013
the patch/subsequent pull was never incorporated into the main trunk it seems, for whatever reason, at least it is not in the debian packages @ deb http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_6.0/ /
i am sure the maintainers have a reason for that, even if it is not clear to me why :)
DeepDiver1975 commentedon Jun 12, 2013
@tron65 your pull request was rejected - feel free to re-start the discussion in #2804 - THX
DeepDiver1975 commentedon Jul 25, 2013
I'm reopening this issue as it looks like it has not yet been solved
DeepDiver1975 commentedon Jul 25, 2013
@VicDeo @bantu any free time at the moment to take a look? Please evaluate if #2804 is a possible solution.
In addition: please test the quota with mounted storages
bantu commentedon Jul 25, 2013
@DeepDiver1975 Please confirm the expected behaviour (quota for user A only considers files owned by A).
DeepDiver1975 commentedon Jul 25, 2013
@bantu hehe - good point - we need a clear definition of quota actually.
From my understanding the quota should only apply to the users primary local dataspace (stuff under /data/${user}/files).
Shared files are not to be counted.
Same for external mounted file systems - we actually might need another quota on external storages
@karlitschek @jancborchardt your opinion
jancborchardt commentedon Jul 25, 2013
I completely agree with how @DeepDiver1975 describes storage management should work. Because files shared with me are not duplicated onto my storage, it should not take away from that. Same for external storages – the data is never duplicated onto my storage either.
While versions and deleted files reside on my storage, they are »shadow files« which will make way for actual data once it’s needed. Hence no need to visualize or inform that I think. (At least not at this point.) cc @schiesbn – but most definitely, versions and deleted files do not count towards storage use either.
jancborchardt commentedon Jul 25, 2013
Also cc @MTRichards and @owncloud/designers for info, see my previous comment.
MTRichards commentedon Jul 25, 2013
For now, as long as we are consistent, I agree with @jancborchardt . As shadow files do not count against quota, we should keep that behavior. However, there are circumstances where you do want them to count against quota. What I would LOVE is a configurable option - so that it can be set by the administrator at the site level in the admin panel.
Example: For this instance of ownCloud, quota should: include files shared with me; only include files I own.
We also have the sticky problem of whether external storage counts against quota or not - but this is an issue to solve later.
jancborchardt commentedon Jul 26, 2013
What are those circumstances? Because if it a file is not actually on the hard drive space reserved for me, it does not seem to make sense to act like it is.
Especially because it is so certain to determine »does this file reside on my storage: yes or no?« (or is it?) a preference seems like making it more complicated than it actually is – which is just having it in the code.
stephanarts commentedon Aug 12, 2013
@jancborchardt I agree with you.
In our configuration we have a group that contains ALL users. If one of our 1800 users would choose to share a file
of 1GB with that group. Nobody would be able to use it. I would consider this a DoS ;-)
mbremer commentedon Aug 13, 2013
Indeed, at the moment I can't put files onto my owncloud storage, because someone shared his maximum amount of storage (1 GB) with me. I only have 10 MB in use and still my quota is exceeded. It should only count the files that you own.
jturmelle commentedon Sep 12, 2013
Its not clear to me if there is a short term plan to fix the current bug of shared storage counting against an individual's quota. The fact, referenced many times in these threads, that you can go over your quota without ever adding a file, shows that quotas are unusable. I've looked at all the references and it seems that fixes aren't planned until OC6 or OC7.
karlitschek commentedon Oct 22, 2013
We need a config switch for that. You want to count the shared folder sometimes and sometimes not.
PVince81 commentedon Nov 5, 2013
Which one is the most common use case ?
I think it shouldn't be possible for people to "pollute" your storage.
Also, if user1 has 1 GB quota and user2 has 1 GB quota, and the total hard disk space is 2 GB. Currently if user2 shares 1 GB with user1, user1 won't be able to upload anything, which means that 1 GB hard disk space will be available forever, wasted.
Can we make the "not counting /Shared" in a user's quota the default ? The switch (if easy to add) will switch it back to the current behavior.
I'll have a look how difficult it is to implement as it is affecting another fix of mine.
PVince81 commentedon Nov 5, 2013
I just had a try with OC 6 Beta 2 (master) and it seems shared files aren't counted in the actual quota.
BUT whatever is displayed in the UI is wrong.
Steps:
At step 5, the file goes through.
At step 6, it doesn't since 50+60 > 100 MB.
The 90 MB file that is in the Shared dir didn't count.
Which means this seems to be fixed already in OC6 but the UI needs to be fixed to show the correct values, there's a PR for that already: #5399
Can someone confirm this ?
PVince81 commentedon Nov 5, 2013
I've done some tests to try and check all use cases and see whether they work consistently with the idea that the file/dir owner is the one whose quota is affected.
Case A: Regular quota without sharing.
✅ Works
Case B: File sharing
user1 shares file F with user2.
Size of file F counts in user1's quota.
✅ Works in OC6.
Case C: Shared dir with write permissions
user1 shares directory D with user2.
user2 uploads file F into directory.
✅ Works in OC6 beta 5
Raised as #5697
Case D: Public dir with write permissions
user1 shared directory D with public link, with upload enabled.
external user uploads file F into D using the public link.
✅ Works in OC6: the file F is counted against user1's quota.
Can't upload a file that would exceed the quota.
Case E: total used space shown in files list
✅ Works correctly in OC6. Was fixed by PR #5399
Case F: total used space shown in personal page
✅ Works correcly in OC6 beta 5. Fixed by #5927
friscoMad commentedon Nov 5, 2013
I have made some more tests with reshared folders with write permissions and there are no difference from shared regular shared folders.
Some of the problems with max upload size and notifications are fixed with #5387 but I have found that it still shows your remaining quota for uploads in shared folders with write permissions (owner remaining quota should be used there).
friscoMad commentedon Nov 5, 2013
Also found that after creating a user with quota it takes some time until it is applied and until then the user quota is 0b

The first time I was even able to go to personal preferences and there it was a 0 of ? too but after rebasing to lastest master I can only reproduce this issue.
PVince81 commentedon Nov 5, 2013
Yes, I'm aware of these issues. Unfortunately still too many to fix.
I'll have a look at the quota calculation related to share folder in #5697.
The issue from your screenshot should be fixed by #5684
The quota calculation is based on the size of the root folder in the database. If that one is either wrong or set to -1 (during a scanning process), then the quota will be either wrong or 0.
PVince81 commentedon Nov 25, 2013
Quota issues have been fixed in OC 6 beta 5. See #2796 (comment) for details.
If you meet new problems please raise new issues.
Thanks.