PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchYou can move an existing ownCloud data directory to another Ubuntu disk without rebuilding the server. The safe sequence is to quiesce ownCloud, copy the directory with rsync, preserve access for Ubuntu’s www-data account, change the absolute datadirectory setting, validate while maintenance mode is still enabled, and only then reopen the service.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What this procedure applies to
This guide covers a classic, native ownCloud installation on Ubuntu using Apache, such as an installation whose current directory is /var/www/owncloud/data. Replace every example path with the paths used by your server. The procedure is not a drop-in recipe for a Docker deployment: containers have their own filesystem paths, container-side occ commands, mount handling, and, in some versions, database-path steps.
As an Amazon Associate I earn from qualifying purchases.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →ownCloud’s installation documentation cautions: “It is best to configure your data directory location at installation, as it is difficult to move after installation.” Moving it later is supported, but it must be treated as a controlled storage migration rather than a simple folder rename.
Prepare the move before touching the server
Confirm the current deployment and path
Find the ownCloud application directory and read the current datadirectory value from config/config.php. A typical native installation has the application in /var/www/owncloud and the data in /var/www/owncloud/data, but your paths may differ. The new value must be an absolute filesystem path, not a path relative to the webroot or the ownCloud application directory.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Also confirm that Apache is the service serving this installation and that www-data is the Ubuntu HTTP account. Run all occ commands as that account; running them as root can create files that the web process cannot later modify.
Check the destination filesystem
Mount the new disk, NAS share, or NFS export at the final path before the migration. For example, if the target is /mnt/owncloud/data, make sure /mnt/owncloud is a real, persistent mount and not merely an empty directory on the root disk. Confirm that it has enough free space for the complete data tree plus future growth.
Free tools Windows power users keep installed
One-click scans. No signup required.
Make the mount persistent in the system’s normal boot configuration and test a reboot or an equivalent unmount/remount procedure before relying on it. Apache and ownCloud must not start against an empty mount point: if the mount is absent, they could see a blank directory and produce confusing errors or write data to the wrong filesystem.
Back up what you will need for a rollback
Take a verified backup of the ownCloud database and copy the ownCloud configuration, including config/config.php. Keep the original data directory intact until the new location has passed administrator testing. A copy-first migration gives you a straightforward fallback; deleting the old directory immediately turns a path mistake into a restoration job.
- Record the old and new absolute paths.
- Record the database backup location and confirm that the backup can be read.
- Check the destination’s available capacity and mount status.
- Schedule a maintenance window long enough to copy the data and inspect logs before users return.
Move the directory step by step
1. Stop web access
Stop Apache so browser requests, WebDAV clients, cron-triggered requests, and background activity cannot change files while they are being copied. The Ubuntu/Debian example in ownCloud’s administration documentation is:
sudo service apache2 stop
On systems managed with systemd, sudo systemctl stop apache2 performs the same service stop. Confirm that Apache is inactive before continuing. Stopping the service prevents new web writes; the maintenance flag below remains important when you start Apache for validation.
2. Enable ownCloud maintenance mode as www-data
Change to the ownCloud application directory and enable maintenance mode with the HTTP account:
cd /var/www/owncloud
sudo -u www-data php occ maintenance:mode --on
Maintenance mode prevents new logins and locks existing sessions. Running occ as www-data keeps ownership and permissions consistent with the account that serves ownCloud. If your application directory is different, run the command there so that it uses that installation’s occ file.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
3. Prepare and verify the mounted destination
Check that the mount is present at the path you intend to configure. The destination in this example is the parent directory /mnt/owncloud; the copy command will create /mnt/owncloud/data. Do not accidentally copy into an unmounted directory on the root filesystem.
For a local disk, verify that the mount is writable by the account and that its filesystem is healthy. For NFS, verify the export and its UID/GID mapping first. NFS ownership semantics depend on the server and mount configuration, so blindly running chown while the export is unavailable can change a local placeholder directory rather than the actual data share.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →4. Copy the data with rsync
With Apache stopped and maintenance mode enabled, copy the existing directory while preserving attributes:
sudo rsync -avz /var/www/owncloud/data /mnt/owncloud
In this exact form, rsync creates /mnt/owncloud/data. The source and destination must be checked character by character before you press Enter. A misplaced trailing slash changes whether the directory itself or only its contents are placed at the destination; if you deliberately use a different slash arrangement, verify the resulting tree before changing the configuration.
-a requests archive behavior, preserving the directory structure and attributes that ownCloud needs. -v shows progress, and -z enables compression. Compression is harmless for a local disk and can reduce transfer traffic over some network mounts, although the copy still depends on the performance and reliability of the underlying filesystem.
5. Verify the copy before changing configuration
Do not switch the path merely because rsync returned to the prompt. Check that the new tree contains the expected users, files, and hidden entries, and compare its size with the source while the source is still available. A simple listing and usage check can reveal an incorrect nesting level such as /mnt/owncloud/data/data:
Recommended Free Tools
sudo ls -ld /mnt/owncloud /mnt/owncloud/data
sudo du -sh /var/www/owncloud/data /mnt/owncloud/data
Inspect representative subdirectories and files, including names with spaces or unusual characters. For a large tree, run a second rsync in dry-run mode using the same source and destination after the first transfer; any unexpected output deserves investigation before cutover. Keep the old directory untouched until testing is complete.
6. Make ownership and access correct
The data directory must be outside the webroot, exclusive to ownCloud, and writable by Ubuntu’s www-data account. Check the owner and permissions:
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
sudo find /mnt/owncloud/data -maxdepth 1 -printf '%M %u:%g %p
'
sudo -u www-data test -r /mnt/owncloud/data && sudo -u www-data test -w /mnt/owncloud/data
The exact permission mode can vary with the installation, but every directory and file that ownCloud needs must be readable, and locations that receive uploads or generated files must be writable, by the web account. Do not grant unrelated applications or ordinary users write access to the data directory. If a local filesystem has the wrong owner, correct it only after confirming the intended mount:
sudo chown -R www-data:www-data /mnt/owncloud/data
Do not apply that command blindly to an NFS export. If the mount is missing, the command can operate on a local directory beneath the mount point; if the server uses identity mapping, the displayed numeric owner may not be changed in the way you expect. Resolve NFS ownership and permission behavior with the storage administrator before proceeding.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems7. Change the datadirectory setting
The traditional method is to edit /var/www/owncloud/config/config.php and change the existing entry to the new absolute path:
'datadirectory' => '/mnt/owncloud/data',
Edit the existing setting rather than adding a second key. Preserve the PHP syntax, commas, and quotation marks around the path, and make a backup of the file before saving.
Where supported by your installed ownCloud version, you can use the configuration command instead, from the ownCloud application directory and as www-data:
cd /var/www/owncloud
sudo -u www-data php occ config:system:set datadirectory --value="/mnt/owncloud/data"
Use the command syntax documented for your ownCloud release. The important result is one absolute datadirectory value that points to the copied tree.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
8. Start Apache while maintenance mode is still on
Start Apache, but do not disable maintenance mode yet:
sudo service apache2 start
Open the ownCloud URL and confirm that the maintenance page appears cleanly instead of a PHP error, missing-data warning, or permission failure. Inspect the Apache error log and the ownCloud log for path, database, and filesystem errors. This stage proves that the application can start with the new path while users are still blocked from changing data.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
If the page reports that the data directory is not writable or cannot be found, stop Apache again, correct the mount or ownership, and recheck the configured absolute path. Do not delete the original directory to make the error disappear.
9. Disable maintenance mode and test normal operation
Once the new path loads without errors, disable maintenance mode as www-data:
cd /var/www/owncloud
sudo -u www-data php occ maintenance:mode --off
Log in as an administrator and test more than the login screen:
- Open several existing files from different user accounts.
- Upload a new file and download it again.
- Rename or delete a test file, then restore it if appropriate.
- Create or inspect a share and confirm that the recipient can access it.
- Check background jobs, previews, and activity generated after the move.
- Review the web-server and ownCloud logs after these actions.
Leave the original data directory in place until these checks succeed and your backup is current. After the retention period you choose, archive or remove the old copy only through a separate, deliberate cleanup operation.
Storage choices: local disk, NAS, or NFS
The destination is not selected by capacity alone. Evaluate growth, mount reliability at boot, backup and snapshot support, ownership semantics, encryption, and the time required to recover. A local filesystem and an NFS export can both work, but their operational risks differ.
| Destination | Checks before migration | Operational concern |
|---|---|---|
| Local disk mounted on the Ubuntu host | Confirm capacity, filesystem health, persistent boot mounting, and www-data read/write access. |
Apache must not start before the disk is mounted, or it may see an empty directory at the configured path. |
| NFS export or NAS-mounted filesystem | Confirm export availability, UID/GID mapping, mount ordering, network access, and backup or snapshot behavior. | Ownership and permissions are controlled partly by the remote server; an unavailable mount can expose a local placeholder directory. |
Keep the data directory dedicated to ownCloud. Sharing the same tree with unrelated applications increases the chance of accidental changes and complicates permissions, backups, and recovery. If encryption is part of your design, document where it is applied and how keys will be restored; the move procedure itself does not create or configure encryption.
Large directories and consistency checks
A multi-terabyte or heavily used data tree can take a long time to copy. The essential consistency rule is that files must not change during the transfer. Stopping Apache and enabling maintenance mode establishes that quiescent state for a native installation. Do not allow users or automated jobs to write directly into the old tree while rsync is running.
If the first transfer is interrupted, rerun the same rsync command after confirming that the source remains unchanged. rsync will compare the trees and transfer what is missing rather than requiring you to discard a complete partial copy. Perform a final verification or dry run before changing config.php.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Some ownCloud releases and migration guides call for a file scan after a data-directory move, particularly when the deployment method or version changes. Check the documentation for the exact major version installed and run its documented occ file-scan command as www-data if required. Do not paste Docker-specific scan or database instructions into a native Ubuntu installation without confirming that they apply to your deployment and schema.
Rollback if validation fails
The safest rollback is possible because the original directory was copied, not moved. If the new path fails:
- Enable maintenance mode if Apache is running, then stop Apache.
- Restore the original
datadirectoryvalue inconfig/config.php, or use the supportedoccconfiguration command aswww-data. - Confirm that the original data directory is still complete and accessible to
www-data. - Start Apache, keep maintenance mode enabled long enough to verify the old path, and inspect the logs.
- Disable maintenance mode only after the original location works.
If the original tree was damaged or the database and files no longer agree, stop and restore the database and configuration from the backups made before the migration. Do not attempt to repair a failed cutover by deleting either copy or by running unverified SQL updates.
Common failure modes
The configured path exists but ownCloud says it is missing
The mount may not be active, the path may contain a spelling or case error, or the copy may have created an extra directory level. Check the result of findmnt or your system’s mount status, list the exact configured path, and verify that it contains the expected ownCloud data rather than an empty mount point.
Uploads fail after the move
Check write access as www-data on the destination and on every parent directory. On NFS, check remote UID/GID mapping and export permissions instead of repeatedly changing ownership from Ubuntu.
Existing files open, but new files or previews do not
This usually indicates partial write permission, a read-only mount, or a background-job process that cannot reach the new filesystem. Test creation as www-data, inspect the mount’s read/write state, and review both Apache and ownCloud logs.
The server works until reboot
The storage mount is probably not persistent or is being mounted after Apache starts. Correct the boot-time mount configuration and service ordering, then test a reboot before declaring the migration complete.
Users see a database or file-scan warning
Do not assume that a native move requires Docker migration SQL. Confirm the ownCloud major version and deployment type, read that version’s migration guidance, and perform only the file-scan or database steps documented for that combination.
Native Ubuntu versus Docker: do not mix the procedures
Classic installations use the host’s Apache service, host paths such as /var/www/owncloud, and the host’s www-data account. A Docker installation normally exposes a container path backed by a host volume. Its maintenance commands must run inside the appropriate container, and the expected mount point may differ from the host path.
The current ownCloud Classic 11 migration material includes Docker-specific sequencing, remounting or copying into the container’s expected path, file scans, and possible database-path updates. Those instructions are valuable for that deployment, but they are not safe substitutions for the native Apache procedure above. Identify the deployment first, then follow one procedure consistently.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →After the migration
Document the new path, mount definition, ownership assumptions, backup job, and rollback location. Include the order in which the storage mount, Apache, and ownCloud should start. Keep monitoring enabled for filesystem and application errors during the first backup cycle and after the next reboot. A successful move is not complete until the new storage is mounted reliably, ownCloud can read and write through www-data, users can perform normal file operations, and you have a tested way to restore the database, configuration, and data.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




