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
Encryption + quota file truncation risk when reaching quota #7626
The second 100kb file is truncated (and encrypted)
Versions
ownCloud 7 pre-alpha (and potentially 6.0.2 as well)
More info
Encrypted files are generally a bit bigger than original files, but the quota calculation is based on unencrypted sizes, which causes confusion and makes the quota wrapper truncate the file too early.
I've discussed this with @schiesbn and we agreed to go with a soft quota. Actually, we've already decided for having a soft quota before because of metadata and other files that do not count into it.
However, the quota stream implementation is still enforcing a hard quota (truncates the last bytes that exceed the quota), and it is tricky to make it work properly in situations where multiple files are uploaded from different sources at the same time and different speeds (race conditions).
We will thus remove the hard limit, which might also mean removing the quota stream wrapper completely as its sole purpose seems to be to enforce that hard limit.
Additionally, as per #7589 it will be possible to also count external storages in the used space, which means that the potential concurrency and file truncation will become even more incontrollable.
I guess the strategy here is to encourage people to use quotas instead of running against the remaining real disk space. So even if I have the data dir on a 100 GB partition, I should set a 90 GB quota as the 10 GB might be required for metadata and such.
It is not recommended to give OC a chance to run against disk limits.
Here are some ideas how the metadata part could be improved: #11963
I'll keep this ticket here open to document the issue for now.
Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.
Activity
PVince81 commentedon Mar 7, 2014
@karlitschek @icewind1991 are you ok with this ? (you'll get another chance to give feedback in the PR 😉 )
PVince81 commentedon Nov 26, 2014
I guess the strategy here is to encourage people to use quotas instead of running against the remaining real disk space. So even if I have the data dir on a 100 GB partition, I should set a 90 GB quota as the 10 GB might be required for metadata and such.
It is not recommended to give OC a chance to run against disk limits.
Here are some ideas how the metadata part could be improved: #11963
I'll keep this ticket here open to document the issue for now.
PVince81 commentedon Nov 26, 2014
Hmmm... now by re-reading the issue it seems this happened when a quota was indeed set, and that quota is hard due to the stream wrapper.
MorrisJobke commentedon Aug 12, 2015
@PVince81 @schiesbn Is this still valid with the new encryption?
PVince81 commentedon Aug 13, 2015
Not sure, might depend on the stream wrapper order
MorrisJobke commentedon Aug 17, 2015
This still happens when trying this with a file that filled 240/250kB.
PVince81 commentedon Aug 15, 2016
Let's throw away the quota stream wrapper anyway at the next opportunity, probably 9.2.
ownclouders commentedon Jan 13, 2018
Hey, this issue has been closed because the label
status/STALEis set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.(This is an automated comment from GitMate.io.)
lock commentedon Jul 31, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.