Steps to reproduce
Expected behaviour
Old versions of files should be deleted
Actual behaviour
Old versions of files are not being deleted
Server configuration
Operating system:
cPanel
Web server:
Database:
PHP version:
7.4
ownCloud version: (see ownCloud admin page)
10.9.1
Updated from an older ownCloud or fresh install:
Where did you install ownCloud from:
Softaculous
Version retention is not working.
Old versions are not getting deleted.
I suspect the CRON job is not running.
If I:
- login to OC as Admin
- select âAdmin | Generalâ from the left navbar
- Under âCRONâ I saw the following:
So I changed to AJAX
The documentation says âEach time a user visits the ownCloud page, a single background job is executed.â
I interpret this as âwhen I visit a webpage on my OC instance, the CRON job will run and remove old versions of filesâ.
I tried that and it hasnât removed them.
So I changed it back to CRON
I am not a server admin specialist.
My OC instance is on a shared server (installed via Softaculous) using cPanel.
On cPanel there is a page for CRON jobs
After reading many pages of OC documentation I created a CRON job as follows:
/usr/local/bin/ea-php74 /data01/MYDOMAIN/public_html/owncloud/cron.php
I told cPanel to send me an email when the CRON job runs and this is what I got
Your Data directory is invalid
Please check that the data directory contains a file â.ocdataâ in its root.
Cannot create âdataâ directory
This can usually be fixed by giving the webserver write access to the root directory.
I assume that this means I have not specified where old file versions are stored.
I think all my OC data is here
/data01/MYDOMAIN/ownclouddata/MYNAME/
and there is a file called .ocdata in this directory
/data01/MYDOMAIN/ownclouddata/
but I now have no idea how to create the command for the CRON job in cPanel.
If there is a (easy) way to create the CRON job in OC then please tell me how to do it.
I would be grateful for any suggestions. Thanks, everyone.