[GUIDE] Installing OwnCloud Server on My Book Live

@chlid

Hey there! Thanks for the quick help. But I have to admit, that I can’t reproduce my fault.

I have just deleted all the owncloud files and folders and reinstalled from the scratch. Now it’s working :slight_smile:

Again: Great tutorial! Thank you a lot!

I would appreciate if you could write something about the security issues :slight_smile:

One issue the script is not accounting for is the .htaccess that is in the original owncloud/data folder.  When you do the

mv /var/www/owncloud/data/* /DataVolume/owncloud_data

  that only moves regular files and not hidden files which the .htaccess file is.

Please adjust the scripts to account for this.  You could simply change it to…

mv /var/www/owncloud/data /DataVolume/owncloud_data

 and that would move the hidden files as well.

For those of you who have already done this and deleted the old folder simply create a file called 

/DataVolume/owncloud_data/.htaccess

In that file put only the following…

deny from all
IndexIgnore *

and then run the following two commands at the prompt to set the permissions correctly on the file.

chown www-data.www-data /DataVolume/owncloud_data/.htaccess
chmod 666 /DataVolume/owncloud_data/.htaccess

Thats it.  No restart of any service or the drive is necessary as apache reads the file each time any files in that folder are accessed or rathter not accessed.  Basically without this file all of your files in your data folder are viewable by anyone who knows the file names normally but luckily owncloud has other safe guards that save you.  But if some of the other safeguards are not working this could be the one that saves your bacon :wink:

Anyway its a good idea to have it!

Thank you to the original author this is a most excellent script and much appreciated!  I love this and I am using it myself!  Now if we can just get owncloud to a more usable state!  I am working on getting the desktop client development environment setup to start tackling some issues with that.  But this works awesome and I really appreciate your hard work on this!

1 Like

Strange, I used the original command from the guide

mv /var/www/owncloud/data/* /DataVolume/owncloud_data

and it moved my .htaccess file and the file has the correct 666 permissions

you wouldn’t by any chance know how to reset the password for the owncloud webpage, i can’t seem to remember the password i used lol…if not ill just reinstall its no biggy

@tekati Thanks! Updated the script to just move the folder, rather than create a new one and move the files… not sure why I did that in the first place.

@nfodiz I’ve noticed that owncloud will generate a .htaccess file under certain conditions - if you have run the owncloud setup process after creating the data symlink, it will likely create a new .htaccess. That might be what happened?

@Theagustin No easy way that I know of, sorry. However, you can do a ‘soft re-install’ by renaming (or deleting) /var/www/owncloud/config/config.php - It will ask for a new admin password, and you will need to set up users again. But the data and permissions should still be there.

Edit: If you aren’t afraid of SQLite, a couple users dig into it in the owncloud forum: http://forum.owncloud.org/viewtopic.php?f=3&t=2183

Excellent Guide!!!  Worked “as advertised”.  I decide to try this for fun after I fixed my Apache / UI issue with the guid linked below.  It is installed perfectly and working…now I am just “tinkering”.

Nothing like buying expensive (kinda) stuff and trying to break it. :smiley:  LOL.  Wife always gets a worried look on her face when we buy a new box and I start tinkering.  LOL LMAO.

Anway, keep up the great work.

Here is the guide I used to fix Apache / UI.  I followd Guide #3

http://community.wdc.com/t5/My-Book-Live/GUIDE-Restore-Downgrade-firmware-via-the-reset-button/m-p/481588#M15044

My apach broke and wont restart after I added the code to 000-wdnas and 000-wdnas-ssl. Can anyone upload both their modded or original copies?

I have installed owncloud many times but not on this device. I followed these instructions but now I just get a white page with the basic text links of the directories in owncloud and a message at the bottom that says  but when clicking them i get “Upgrading filesystem cache…”.    Also, thoughout this process, once I started I could not access using the url http://mybooklive and could only get to it using the internal IP address url of http://10.162.190.130/owncloud

Not Found

The requested URL /owncloud/index.php/settings/personal was not found on this server.

Can anyone helpout here. can be contacted at mrbroes at gmail or reply here.  thanks! Much appreciated.

Ok, I had some issues, I briked the box, recovered it and reinstalled.  I used wheezy and it works fine.  I figured out the hiccup in this process, It is all good but there is a step missing or I guess you could call it timing.  When you install owncloud through your browser you are required to set the location of the data which we later move but, not until after the installation is complete.  That means the config.pho file in owncloud is inaccuaret.   Yes, you will still be able to access owncloud but your instructions creates a new directory. 

It creates 

/DataVolume/owncloud_data

However, the 2nd stage then moves your data file from var/www/ which now mean that you have /DataVolume/owncloud_data/data.   The process copies/duplicates the data from the data file and creates another directory for admin.  Two things happen here.   First you have duplicate files directories within the /DataVolume? directory and you can no longer login as Admin since you actual datafile isn’t accecible to owncloud during login because the config.php  file located at “/var/www/owncloud/config/config.php”  is looking for a “data” directory in “/var/www/owncloud/data”

So, corrective action is this. Open WinSCP and find “/var/www/owncloud/config/config.php” .  It should look like this:

<?php$CONFIG = array ('instanceid' => '51b522ea0bf11','passwordsalt' => 'fbf4cd95c487dac4a46c43962b0f96','datadirectory' => '/var/www/owncloud/data','dbtype' => 'sqlite3','version' => '5.0.12','installed' => true,

Change line 5 to read: 

'datadirectory' => '/DataVolume/owncloud_data/data'

Remove “/var/www/owncloud/data”

Save it. 

Now, go back and refresh your browser and login with the admin and password logins you installed owncloud with.

All is working great now.   I am thinking about creating an imagine of the entire drive of my 3 TB Mybooklive and posting since it is brand new and has no files on it at all.   Fresh install with a simple admin login and default password.    This would make it much easier to just find the image and write to the disk along with very tweaks.  Thoughts anyone?   

Let me know if there is interest and I will post a download link for it before I load files on it. 

Hope this helps someone. 

HippyKilla

i’m in the middle of setting up owncloud…

i went to my browser and it tells me i have successfully installed owncloud, then i receive this message on my browser: “PHP module GD is not installed”… what did i miss? any help appreciated. Thank you!

I got that error too. It’s probably a false positive. There are 3 ways to see if the module is installed

apt-get install php5-gd

 It should tell you it is already installed

The second test would be when your done installing it, upload some pictures and see if it shows thumbnails

Third test

MyBookLive:~# php5 -i | grep -i --color gd/etc/php5/cli/conf.d/gd.ini,gdGD Support => enabledGD Version => 2.0gd.jpeg_ignore_warning => 0 => 0

thanks for the fast reply!

i freaked out too soon ;o) after a while i hit the “back” button and it went to the “register admin” page… i did a check and php5-gd is actually already installed… must really have been a false positive…

thanks again!

wow, owncloud is GORGEOUS! …and after datagate I’m very happy to have installed it!!!

just a stupid question: how do I have it to show all the files stored on my MBL without having to upload them?

thanks!

That’s a good question and something I would have to look into as I have only manually uploaded a few files to it

ok, owncloud has now rendered my MBL VERY VERY slow… I believe it started having authentication problems when I tried to use the owncloud desktop sync client… Probably there are some issues with webDAV…

is there a way to remove completely owncloud or to reinstall it on MBL?

thanks!

Edit: now MBL is running fine again… I disabled “webDAV user backend” app: I thought it might help the process of webDAV authentication, but it only caused me trouble (I believe I am not able to set it up correctly).

Anyone had problems with the windows desktop sync client for owncloud?

ok, apparently there are issues with webDAV authentication.

I can access owncloud on http://mybooklive/owncloud/ but cannot map the drive or use the desktop sync client. The issue is with webDAV authentication. Probably on the server the WebDAV module is interfering with owncloud’s built-in WebDAV module…

This is the message:

(I get the same message when i use http://)

I have found these notes: http://forum.owncloud.org/viewtopic.php?f=17&t=7536 , but could not decide what to do…

Any help is greatly appreciated!

(PS: should I start a new thread for problems related to running ownCloud on MBL, and leave this only to installation issues?)

Here is a good spot I think. Addchild hasn’t been on the forums in 3 weeks but if he pops in he might have an answer as well as other people who have installed this. I simply haven’t used it to the extent you have yet and know very little on the Apache/PHP/WEBDAV side of things.

thanks nfo!

I’m going to look into it as well, though my knowledge of Debian and Apache is almost zero…

There must be something on the net… still, I hope Addchild (or anybody with some knowledge on this) drops by…

I just installed ownCloud using the guide. Wow! Fantastic work!!!  I had a few steps where i was stuck, but with careful reading of the comments, i figured it all out, including how to configure the client for remote access.

Using the client and connecting locally i was able to syncronize. I was also able to synconize remotely using the client.

Thank you for this fantastic guide!

nicopizza wrote:

thanks nfo!

I’m going to look into it as well, though my knowledge of Debian and Apache is almost zero…

There must be something on the net… still, I hope Addchild (or anybody with some knowledge on this) drops by…

Concerning your question about adding all your shares/files to OwnCloud…I got a minute to play and it’s actually quite easy. For instance if I want to add all the shares on my MBL to OwnCloud I would simply create a symlink in PuTTY as follows

ln -s /DataVolume/shares /DataVolume/owncloud_data/YOUR USER NAME HERE/files/shares

You have to change “YOUR USER NAME HERE” to your username in OwnCloud

This will create a symlink called shares to all your shares in your OwnCloud files folder giving you access to ALL your shares

If you just wanted to add your Public share to OwnCloud you would simply type this in PuTTY

ln -s /DataVolume/shares/Public /DataVolume/owncloud_data/YOUR USER NAME HERE/files/Public

Again you have to change “YOUR USER NAME HERE” to your username in OwnCloud

This would put a symlink to your Public share in your OwnCloud folder giving you access to the files in that folder