Difference between revisions of "CentOS 8.x Owncloud changing datadirectory for a new installation"
From Notes_Wiki
(Created page with "<yambe:breadcrumb self="Owncloud changing datadirectory for a new installation">CentOS 8.x Owncloud|Owncloud</yambe:breadcrumb> =CentOS 8.x Owncloud changing datadirectory for...") |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x Desktop tools or applications|Desktop tools or applications]] > [[CentOS 8.x Owncloud|Owncloud]] > [[CentOS 8.x Owncloud changing datadirectory for a new installation|Changing datadirectory for a new installation]] | |||
It is not possible to change datadirectory easily on an existing installation as various databases hashes and paths need to be updated. However, for a new owncloud installation (Tested on bitnami ownloud 10.6.0-2) we can change data directory using: | It is not possible to change datadirectory easily on an existing installation as various databases hashes and paths need to be updated. However, for a new owncloud installation (Tested on bitnami ownloud 10.6.0-2) we can change data directory using: | ||
Line 39: | Line 38: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x Desktop tools or applications|Desktop tools or applications]] > [[CentOS 8.x Owncloud|Owncloud]] > [[CentOS 8.x Owncloud changing datadirectory for a new installation|Changing datadirectory for a new installation]] |
Revision as of 04:21, 23 April 2022
Home > CentOS > CentOS 8.x > Desktop tools or applications > Owncloud > Changing datadirectory for a new installation
It is not possible to change datadirectory easily on an existing installation as various databases hashes and paths need to be updated. However, for a new owncloud installation (Tested on bitnami ownloud 10.6.0-2) we can change data directory using:
- Create folder for data directory. This could be an LVM mount point. For example /mnt/files
- mkdir /mnt/files #Or mount <lvm-device> /mnt/files
- Change the ownership on this folder to daemon:daemon
- chown -R daemon:daemon /mnt/files
- Move existing data directory files to this location
- cd /opt/owncloud-10.6.0-2/apps/owncloud/data
- mv * /mnt/files
- mv .* /mnt/files #Important to move .ocdata and .htaccess files
- Update '/opt/owncloud-10.6.0-2/apps/owncloud/htdocs/config/config.php' with the new path
- 'datadirectory' => '/mnt/files',
- Log into database using credentials from the above config file using '/opt/owncloud-10.6.0-2/mysql/bin/mysql -u root -p' and do following changes
- Check oc_accounts table
- select * from oc_accounts;
- If admin data folder is pointing to older path and not to updated /mnt/files then use following:
- update oc_accounts set home = '/mnt/files/admin' where user_id='admin';
- Check oc_accounts table
- Now scan for changes for all paths using
- cd /opt/owncloud-10.6.0-2/apps/owncloud/htdocs
- sudo -u daemon /opt/owncloud-10.6.0-2/php/bin/php occ files:scan --all
- Upload a small test file to admin user and check contents of /mnt/files/admin/files folder to see if the new uploaded file is available there.
Home > CentOS > CentOS 8.x > Desktop tools or applications > Owncloud > Changing datadirectory for a new installation