Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Free trash bin using cron #8109

Closed
dietmaroc opened this issue Apr 8, 2014 · 13 comments
Closed

[FR] Free trash bin using cron #8109

dietmaroc opened this issue Apr 8, 2014 · 13 comments

Comments

@dietmaroc
Copy link

Steps to reproduce

  1. call oc-cron.php via system cron
  2. files in trashbin, that exceed thrascan_retention_obligation from config.php won't be deleted

Expected behaviour

calling oc-cron.php via system cron should delete files in trashbin, that exceed thrascan_retention_obligation from config.php.

Actual behaviour

calling oc-cron.php via system cron doesn't delete files in trashbin, that exceed thrascan_retention_obligation from config.php.

Server configuration

ownCloud version:
6.0.2

@DeepDiver1975
Copy link
Member

@MTRichards @karlitschek @schiesbn

@schiessle
Copy link
Contributor

The trashbin doesn't use a cronjob. Old files in the trashbin will be removed the next time a file gets moved to the trash.

@DeepDiver1975
Copy link
Member

The trashbin doesn't use a cronjob.

That's why this issue has been opened - even if no user action is performed the expectation is that the files in trash bin have a max live time as defined with the config value trashbin_retention_obligation

@schiessle
Copy link
Contributor

Is it a problem if the file exists a bit longer in the trash? Until now I didn't considered it a problem. At the moment I don't see the benefits which would outweigh the potential drawback of the additional code (more complexity, more maintenance efforts, potential new bugs, etc.)

@MTRichards
Copy link
Contributor

It very much could be a problem for certain high security use cases where a file must be deleted within a time frame, though to be fair I have not run into this explicitly.

Question: does the trashbin get counted in quota?

@schiessle
Copy link
Contributor

Question: does the trashbin get counted in quota?

No, currently the trashbin works the same way as the versions app. Each of them gets 50% of the current available free space. This way we make sure that we keep as much deleted files and versions as possible but don't run out of memory for "real" files. For the user it looks like the trasbin doesn't use any space because we just use the available free space and free it as needed.

@MTRichards
Copy link
Contributor

For the user it looks like the trasbin doesn't use any space because we just use the available free space and free it as needed.

So the trashbin files could also be deleted if the user uploads a lot of files and starts to use most of their quota, if I remember correctly?

@schiessle
Copy link
Contributor

So the trashbin files could also be deleted if the user uploads a lot of files and starts to use most of their quota, if I remember correctly?

Yes, after every upload we will re-calculate the available size for the trashbin and remove old files if needed

@cdamken
Copy link
Contributor

cdamken commented May 13, 2014

If the parameter is: 'trashbin_retention_obligation' => 6
then should the trashbin deleted after 6 days.
Why doesn't do that?

@cdamken
Copy link
Contributor

cdamken commented May 22, 2014

Any news?

@schiesbn

@schiessle
Copy link
Contributor

the trashbin retention obligation is not a hard deadline. It is more a guaranteed time span how long the files will be available at the least (given that you don't run out of space).

As already said, the trash bin doesn't use cronjobs until now. Maybe this will change, but most likely not for OC7

@DeepDiver1975
Copy link
Member

@icewind1991 something for the job queue - as discussed - THX

@DeepDiver1975
Copy link
Member

fixed with #14644

@lock lock bot locked as resolved and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants