如何重新扫描owncloud 5中的文件系统
时间:2019-08-20 17:58:18 来源:igfitidea点击:
在本文中,我们将了解如何在owncloud5.x中重新扫描文件系统版本。
方法1:使用console.php文件来重新扫描owncloud文件系统。
语法:
扫描某个用户的文件系统:
/path/of/owncloud/console.php files:scan Userid
全扫描:
/path/of/owncloud/console.php files:scan --all
方法2: 此方法需要mysql服务器用户名和密码。
mysql服务器详情
数据库名称:owncloud
表名:oc_filecache
登录mysql server
mysql -u root -p
登录mysql服务器后,会有mysql提示(mysql>)
更改为owncloud数据库。
mysql > use owncloud;
现在截短表oc_filecache
truncate oc_filecache;
从特定用户的数据库中清除文件缓存,按照以下步骤操作
这里,我们正在清除名为Hyman的用户的filecache。
首先,我们将获取它的存储id,然后从oc_filecache表中清除它的行
UserID=Hyman
mysql> select * from oc_storages; +---------------------------------------+------------+ | id | numeric_id | +---------------------------------------+------------+ | local::/var/lib/owncloud/data/admin/ | 1 | | local::/var/lib/owncloud/data/Hyman/ | 2 | +---------------------------------------+------------+ 2 rows in set (0.00 sec) mysql> select * from oc_filecache where storage = 2; +--------+---------+-------------------+----------------------------------+--------+-------------+----------+----------+-------+------------+-----------+------------------+---------------+ | fileid | storage | path | path_hash | parent | name | mimetype | mimepart | size | mtime | encrypted | unencrypted_size | etag | +--------+---------+-------------------+----------------------------------+--------+-------------+----------+----------+-------+------------+-----------+------------------+---------------+ | 4 | 2 | | d41d8cd98f00b204e9800998ecf8427e | -1 | | 2 | 1 | 95102 | 1384442192 | 0 | 0 | 5284e95230eb2 | | 5 | 2 | files | 45b963397aa40d4a0063e0d85e4fe7a1 | 4 | files | 2 | 1 | 95102 | 1384442218 | 0 | 0 | 5284e96a7b19c | | 6 | 2 | files/mysql.png | f876c595495bf53c3eefa2cca290ed53 | 5 | mysql.png | 4 | 3 | 35405 | 1384442217 | 0 | 0 | 5284e969ab72e | | 7 | 2 | files/mysql2.png | 098fd1ef4694f1a9708fcac12c095192 | 5 | mysql2.png | 4 | 3 | 58305 | 1384442218 | 0 | 0 | 5284e96a4006e | | 8 | 2 | files/htaccess[1] | 30ba77b8d85dfe0b16c1f8fc70255225 | 5 | htaccess[1] | 6 | 5 | 1392 | 1384442218 | 0 | 0 | 5284e96ab674d | +--------+---------+-------------------+----------------------------------+--------+-------------+----------+----------+-------+------------+-----------+------------------+---------------+ 5 rows in set (0.00 sec) mysql> delete from oc_filecache where storage = 2; Query OK, 5 rows affected (0.08 sec) mysql>