Difference between revisions of "CentOS 7.x Owncloud file cache and sharing"
m |
m |
||
Line 3: | Line 3: | ||
Table oc_filecache has cache information. But that information is used in oc_share to understand which files are shared with whom. Hence the information in that table is critical. If there is a path issue then use: | Table oc_filecache has cache information. But that information is used in oc_share to understand which files are shared with whom. Hence the information in that table is critical. If there is a path issue then use: | ||
<pre> | <pre> | ||
cd /opt/owncloud-10.0.10-4/apps/owncloud/htdocs | |||
sudo -u daemon /opt/owncloud-10.0.10-4/php/bin/php occ files:scan --all | |||
</pre> | </pre> | ||
For faster recovery we can also given path such as | For faster recovery we can also given path such as | ||
<pre> | <pre> | ||
sudo -u daemon /opt/owncloud-10.0.10-4/php/bin/php occ files:scan --path "admin/files/HR DEP/hr2" | |||
</pre> | </pre> | ||
If apache is running with other user privileges eg apache then you may have to do '<tt>sudo -u apache</tt>' instead of '<tt>sudo -u daemon</tt>' | |||
'''In any case do not truncate or delete rows from oc_filecache manually or else all sharing will get broken. ''' | '''In any case do not truncate or delete rows from oc_filecache manually or else all sharing will get broken. ''' | ||
Line 24: | Line 27: | ||
Go to maintenance mode, delete all rows from filelocks table and then switch of maintenance mode using: | Go to maintenance mode, delete all rows from filelocks table and then switch of maintenance mode using: | ||
<pre> | <pre> | ||
sudo -u | cd /opt/owncloud-10.0.10-4/apps/owncloud/htdocs | ||
sudo -u daemon /opt/owncloud-10.0.10-4/php/bin/php occ maintenance:mode --on | |||
(With MySQL) truncate table oc_filelocks; | (With MySQL) truncate table oc_filelocks; | ||
sudo -u | |||
cd /opt/owncloud-10.0.10-4/apps/owncloud/htdocs | |||
sudo -u daemon /opt/owncloud-10.0.10-4/php/bin/php occ maintenance:mode --on | |||
</pre> | </pre> | ||
Refer [[CentOS 8.x Owncloud direct DB queries]] for connecting to owncloud database | |||
Revision as of 14:18, 5 February 2021
<yambe:breadcrumb self="Owncloud file cache and sharing">CentOS_7.x_owncloud|Owncloud</yambe:breadcrumb>
CentOS 7.x Owncloud file cache and sharing
Table oc_filecache has cache information. But that information is used in oc_share to understand which files are shared with whom. Hence the information in that table is critical. If there is a path issue then use:
cd /opt/owncloud-10.0.10-4/apps/owncloud/htdocs sudo -u daemon /opt/owncloud-10.0.10-4/php/bin/php occ files:scan --all
For faster recovery we can also given path such as
sudo -u daemon /opt/owncloud-10.0.10-4/php/bin/php occ files:scan --path "admin/files/HR DEP/hr2"
If apache is running with other user privileges eg apache then you may have to do 'sudo -u apache' instead of 'sudo -u daemon'
In any case do not truncate or delete rows from oc_filecache manually or else all sharing will get broken.
Refer:
- https://github.com/owncloud/core/issues/14684
- https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/occ_command.html
For file locks error during scan
Go to maintenance mode, delete all rows from filelocks table and then switch of maintenance mode using:
cd /opt/owncloud-10.0.10-4/apps/owncloud/htdocs sudo -u daemon /opt/owncloud-10.0.10-4/php/bin/php occ maintenance:mode --on (With MySQL) truncate table oc_filelocks; cd /opt/owncloud-10.0.10-4/apps/owncloud/htdocs sudo -u daemon /opt/owncloud-10.0.10-4/php/bin/php occ maintenance:mode --on
Refer CentOS 8.x Owncloud direct DB queries for connecting to owncloud database
<yambe:breadcrumb self="Owncloud file cache and sharing">CentOS_7.x_owncloud|Owncloud</yambe:breadcrumb>