Simple utility for removing[1] extra files from ownCloud instance.
Use it when you see message There were problems with the code integrity check
and integrity report contains only extra files.
[1] Actually extra files only moves outside OC instance directory.
- onwCloud instance with extra files listed in integrity report.
- php-cli SAPI to run script.
- bash interpreter.
Tested on Ubuntu Linux 14.04 LTS so Linux-based OS and Debian/Ubuntu distro are recommended.
- Copy PHP file to prefered location.
(eg.
/opt/oc-integrity-cleaner-cli/oc-integrity-cleaner-cli.php
) - Optional. [root] Create launcher script in PATH (for all users)
cat > /usr/bin/ocic <<EOL
#!/bin/bash
/usr/bin/env php -f /opt/oc-integrity-cleaner-cli/oc-integrity-cleaner-cli.php $@
EOL
chmod +x /usr/bin/ocic
[any user] or create alias
echo 'alias ocic="/usr/bin/env php -f /opt/oc-integrity-cleaner-cli/oc-integrity-cleaner-cli.php"' >> ~/.bash_aliases
. ~/.bash_aliases
That's all folks.
- Switch to OC instance root directory (eg.
cd /var/www/owncloud
) - Exec oc-integrity-cleaner-cli.php script.
php -f /path/to/oc-integrity-cleaner-cli.php
# or just
ocic
- Enter your OC instance admin credentials and watch for result.
- Extra files will moved to backup directory located at
~/oc-integrity-cleaner-backup
- [Web] Login to your OC instance and go to admin area.
- [Web] Rescan integrity.
- Repeat steps 2, 3 and 5 while report contains extra files.
MIT License: see the LICENSE file.
eof