Jump to content

Webdav issues: Owncloud


Recommended Posts

Hi all. I have posted on Mageia forums, but so far no luck :(


So I'll run it past the faithful group here :)/>/>


Clean install of Mageia 4 with /home on a separate partition.


So I install, via MCC, the owncloud server: Took a bit of messing around to get a static ip on my home network.


Then I point browser at http://MYipaddy/owncloud which brought up the admin page: I tried to set the data directory as /home/owncloud/data. That failed due to permissions, I found on the web this command



chown -R apache:apache /home/owncloud/data 



Which then let me get past the admin page. Now im stuck on post setup check with:


Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.
Please double check the installion guides



So, I've checked the log, and this seems to be the issue:



{"app":"core","message":"isWebDAVWorking: NO - Reason: [CURL] Error while making request:
Connection timed out after 10004 milliseconds (error code: 28) (sabre_DAV_Exception)", "level":2,"time....etc



So, was my change of permissions the right thing to do? How do I proceed regarding this WebDAV issue?



Link to comment
Share on other sites

I don't know owncloud, but my first guess is apache Directory directive


       <Directory "/home/owncloud/data/">
               Options Indexes FollowSymLinks MultiViews
               AllowOverride All
               Order allow,deny
               allow from all



it's the allow from all that's the important bit.

apache needs to own the directory AND be told that requests can be made to that directory.

Link to comment
Share on other sites

Changing the owner of data is correct. You probably need to enable the webdav module in apache - that's what your error is throwing. I found a post that curl is optional, so another way is edit php.ini find the php_curl module in there, and comment it out. Maybe curl is just throwing an error because something is not quite correct.


Two things to check at least.


Normally I download and extract manually from owncloud. This means you get something without any "distro" tampering - which is something you might be experiencing because you installed it via MCC. Also you don't necessarily have the newest version available. Too many times I've had problems with distros and installing from the repo, for example joomla, redmine, owncloud (Debian when I experienced problems). Sometimes it's just easier and better to do it a bit more "manual" and download and extract manually.

Link to comment
Share on other sites

Hi Ian, valid comments. I would like to get the version from the repo working for ease of updating. If this proves too hard, we will go direct.


Ok, so a bit of research shows I need to modify a file called httpd.conf: I have found two:




I assume it's the second one? This appears to be the original files, with lots of remarks. It's only got a few directory sections: /, /var/www, /var/www/cgi-bin


So I guess I need to add something like what Paul has suggested above?


Thanks guys, appreciate the help.

Link to comment
Share on other sites

The bit paul wrote is for helping with access to the directory, it doesn't fix your webdav issue. That's something you need to get apache configured for. Maybe you need to install some extra packages?


Trying installing: apache-mod_dav


I found this when googling "mageia apache webdav".


Restart apache afterwards, and try again.

Link to comment
Share on other sites

Ian. What an interesting round trip.


So I install apache-mod_dav, then while that's finished, I get told there are updates: Seeing owncloud as one of them, I don't think and update all........


Then I get told I'm an untrusted domain by owncloud.


So it takes a bit of time on IRC to work out whats going on, basically add my owncloud host's ip as a trusted domain, and logged straight in!


So I now have an Owncloud server set up! Yes!


Let me see if I can configure my other pc's and phones to access it.

Link to comment
Share on other sites

So tonight's goal was to get https working with owncloud


I think I went the long way round: I started generating keys: but was then advised to try connecting via: https://IP.address/owncloud


And I could, which then allowed me to enter the admin settings and force https redirection


I now need to learn how to add self generated certificates to shut firefox up

Link to comment
Share on other sites

You probably already had self-signed certificates by default, if you connected to owncloud with https from the beginning. Firefox will shout about self-signed certificates. If you want to generate free one's which are verified Class I certs, you can get from http://startssl.com

Link to comment
Share on other sites

Ian, firefox allows me to add an exception, and make it permanent. When I added the client to my desktop it complained about certificates, but it works fine.


Now I just want to confirm that the system is safe:


So, can you confirm that the chown line I ran earlier in the thread is ok?


In the firewall section of MCC I have enabled webserver. I guess I should enable ssh-server so I can log in and admin/update it remotely.


Is this locked down securely with these enabled? I plan to tuck the server away in a corner, and just update it. It's not going to be used in any other task in the near future.

Link to comment
Share on other sites

On private network yes it's enough, but if you will access it from the internet then you'll need to secure SSH with public keys instead of passwords, and also install something like denyhosts to protect SSH from being attacked by people trying to login to your server. Can even change SSH to run on a different port than port 22, to also minimise the risk.


And yes, the chown is fine, because you upload everything using the web browser which connects to the web server, and the web server needs access to that folder/directory to save any files you upload. I expect all of that is in the owncloud docs.

Link to comment
Share on other sites

Thanks Ian. I'm a little confused regarding the network arrangement.


This owncloud server is connected to my router, which connects all PC's on the network to the internet. Although I don't intend to access this owncloud server from outside my router controlled network, I'm not sure if that means I should be playing with ssh keys and changing ports. Can you clear that up for me please?


Many thanks,


Link to comment
Share on other sites

If you aren't natting on the router (port-forwarding) to gain access to it externally, then no, you won't need to. Then you are just using it for internal use on your private network.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...