When installing OwnCloud, you will probably have an external hard drive that you will want to have as your data directory. You can place the entire owncloud directory on your hard drive but this will result in slower performance when really all the large data files will be in /data. By moving /data, you have gigabytes or terabytes of extra storage that your desktop machine cannot run. Getting OwnCloud to recognize that external hard drive is tougher that you think.
Owncloud
You could change /var/www/owncloud/config/config.php ‘s datadirectory to look at the new location, but that never worked for me. Rather, we are going to create a mount point and not a symbolic link. The symbolic links have a permission issues that “mackey” discovered and they will cause you a huge headache.

Notes before reading:

  • Some of these may need a sudo in front to execute.
  • You can apply stricter permissions in the chmod step.
  • If you mess up the mount step, you can edit /etc/mtab to remove your mounts or you can use umount folder_you_mounted to clean up your mounts.
  1. So, create your folder on your hard drive, let’s call it
    mkdir /media/user/your_hard_drive/owncloud_data (Updated on 3/12/2015)
  2. Stop your apache2 service
    sudo service apache2 stop
  3. Copy your data directory to the new location
    cp -rT /var/www/owncloud/data/ /media/user/your_hard_drive/owncloud_data/
  4. Rename your data directory to avoid confusion
    mv /var/www/owncloud/data /var/www/owncloud/data_original
  5. Apply the proper group and read permissions onto the hard drive’s data directory
    chown -R www-data:www-data /media/user/your_hard_drive/owncloud_data/
    chmod -R 777 /media/user/your_hard_drive/owncloud_data/
  6. Make the folder that will be mounted
    mkdir /var/www/owncloud/data
  7. Apply the proper permissions onto this soon-to-be-mounted folder
    chown -R www-data:www-data /var/www/owncloud/data
    chmod -R 777 /var/www/owncloud/data
  8. Make the mount
    mount –bind /media/user/your_hard_drive/owncloud_data/ /var/www/owncloud/data/
  9. Start apache service
    sudo service apache2 start

Verify you can access your owncloud server (typically localhost/owncloud)
Verify in top right Username>Personal that you have a large amount of storage space left.

https://i2.wp.com/nvtienanh.com/wp-content/uploads/2015/12/owncloud-updated-26-02-2014-600x296.png?fit=600%2C296https://i2.wp.com/nvtienanh.com/wp-content/uploads/2015/12/owncloud-updated-26-02-2014-600x296.png?resize=150%2C150Nguyễn Văn Tiến AnhBlogLinuxmove Owncloud data folder,Ubuntu serverWhen installing OwnCloud, you will probably have an external hard drive that you will want to have as your data directory. You can place the entire owncloud directory on your hard drive but this will result in slower performance when really all the large data files will be in...Tien Anh Nguyen Van