I have a Raspberry Pi 3 (nginx,php5,mysql) with an external 5TB HD (ext4) which I am trying to set up with owncloud.
I am trying to replace Google Drive, with which I've had a few issues. The 5TB HD is basically a clone of a HD on my desktop computer. Ideally, these Pi and desktop drives will remain completely in sync. In addition, two folders will be synced to both my laptop and mobile phone.
I went through the install yesterday and had no problems. However, I used the default data location, since I'd assumed it would be easy to move it afterwards. After installation, I moved the location in the config file, but could not get the files to show up on owncloud. After doing a little more reading, it sounded like the easiest way to get everything to work would be to just reinstall owncloud and set the data directory to my external HD during installation.
I did this today, but the files still are not showing up. The only files on owncloud are the default installation files (Documents / Photos / owncloud manual). After changing ownership back to my user and opening up the directory, I saw that owncloud created a "username" directory. Inside this directory there is a "files" directory, and in this folder are the default owncloud files. All my other files on the hard drive are outside this directory, and thus are not displaying in owncloud. This is pretty frustrating and not at all the behavior I expected when choosing the hard drive as my data folder.
To recap, this is my situation:
/web/sitename/www/owncloud --> where owncloud is installed
/media/username/drive-name --> where the drive is mounted; I have several major directories here that I want in owncloud
/media/username/drive-name/username/files --> the default owncloud files, which are the only ones currently displaying over the web
Ownership of the drive was set recursively to www-data; permissions were set to 0770.
My question: how can I get the entire contents of my external hard drive onto owncloud? I'm willing to do a reinstall -- I just want this to work and be able to move on at this point.
Additional question: is there any way to set permissions so that my Pi user and www-data can cd through the drive? I tried to set up a shared group (user + www-data), but I'm still in the process of learning Linux and may not have done it correctly.
TIA for any advice or insight.
Update (20160831 0200 UTC): I just activated the external storage app, and now the drive is appearing in owncloud.
(1). I now have the username/files folder and all the other owncloud config files appearing as well.
I imagine this might be problematic, and it is certainly not neat. To achieve what I'm looking for, would the solution be to:
A. Reinstall again.
B. Install the data file inside the web directory (out of www root, though).
C. Use the app to load my local external drive.
(2). Syncing is not clean. I just tried to sync one folder, and it is not working well.
I am trying to sync:
On my desktop drive: media/drive/owncloud/folder 1/folder xyz
On my raspberry pi: media/drive/owncloud/folder 1/folder xyz
What I am getting on my desktop drive:
media/drive/owncloud/folder 1/folder xyz/local/owncloud/folder 1/folder xyz
Again, any feedback would be much appreciated. TIA.