Hello i have a owncloud server Version 9.1.5 (stable), based on ubuntu.
It works fine and i authenticate the users via LDAP attached to a windows active directory and everything works fine.
I need to delete the files older than 7 days, i know there is not such a feature so i created the following script:
!/bin/bash
Erase files older than 7 day in my data directory and mantain folders:
/usr/bin/find /owncloud/owncloud/data/*/files/ -mtime +7 -exec rm {} \;
rescan filesystem:
/usr/bin/sudo -u www-data php /owncloud/owncloud/occ files:scan "--all"
Steps to reproduce
1.Run the command : /usr/bin/sudo -u www-data php /owncloud/owncloud/occ files:scan "--all"
Expected behaviour
Tell us what should happen
As from doumentation it is supposed to rescan all the file user and update the db removing the deleted files.
Actual behaviour
Tell us what happens instead
Actually when i run it :
/usr/bin/sudo -u www-data php /owncloud/owncloud/occ files:scan "--all"
[OC\ServerNotAvailableException]
Connection to LDAP server could not be established
files:scan [--output [OUTPUT]] [-p|--path PATH] [-q|--quiet] [-v|vv|vvv|--verbose] [--all] [--unscanned] [--] []...
Server configuration
Operating system:Ubuntu 14.04.5 LTS
Web server:Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.21 OpenSSL/1.0.1f
Database:mysql
PHP version:
ownCloud version: (see ownCloud admin page)9.1.5
Updated from an older ownCloud or fresh install:fresh install