Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
I have a website hosted on a hosting service and have created a webdav on my Kubuntu 11.10 desktop that "points to" the root directory of my website. When I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2011
    Posts
    19

    How to use webdav?


    I have a website hosted on a hosting service and have created a webdav on my Kubuntu 11.10 desktop that "points to" the root directory of my website. When I click the webdave icon the Dolphin file manager opens in my root directory on my website and I can drag 'n drop files betwen my own computer and the server and use it as if it were a directory on my own disk but only within Dolphin.

    I need to move over a hundred files to the sever several times a day so I would like to automate the process. The trouble is when I try to cp a file from my local disk to the webdav URL in a bash script or even just on the command line I get the "no such file or directory" error. I suppose I need to mount the webdav url as a disk/directory or something similar? How do I do that? Does anybody have a better idea for accomplishing what I want to to?

    BTW, when the webdav is open in Dolphin the "path" is webdavs: radacdat.ca.

  2. #2
    Just Joined!
    Join Date
    Mar 2011
    Posts
    19
    The solution is called davfs and it's available at savannah. nongnu. org /projects/davfs2. davfs mounts webdavs in your local file system so they appear as any other file. I installed it on Ubuntu with apt-get install davfs2. Includes a man page which I just finished reading. I haven't actually used it yet but it looks like it's going to be easy, far easier than using Python's ftp module. Nothing wrong with that module or Python but ftp isn't the most user friendly protocol when trying to move hundreds of files into a hundred different directories programatically.

  3. #3
    Just Joined!
    Join Date
    Mar 2011
    Posts
    19
    Did I say it looked like it was going to be easy? I should know better by now! It turns out the man page needs updating because the examples in the man page doesn't work. So I tried mount.davfs --help and got different advice than what's in the man page and now it works. I can't seem to mount a webdav as a regular user (maybe just not giving the command line options correctly) but I can as root with a simple sudo mount -t davfs https ://radacdat.ca:2078 /webdavs/radacdat. The URL is the webdav server and the path after the URL is the mount point on the local filesystem. That directory must exist before you give the mount command. After that you need to give the login name and password then you're done.

    It turns out davfs isn't the only solution. There is also cadaver which I didn't actually try but info I read on it says it uses ftp like commands to move files and manipulate directories. It might work great but I don't want ftp like commands so I'll stick with davfs for now.

  4. #4
    Just Joined!
    Join Date
    Mar 2011
    Posts
    19
    It says I can't post URLs until I have posted 15 times. No problem.

    Post 4.

  5. #5
    Just Joined!
    Join Date
    Mar 2011
    Posts
    19
    It says I can't post URLs until I have posted 15 times. No problem.

    Post 5.

  6. #6
    Just Joined!
    Join Date
    Mar 2011
    Posts
    19
    It says I can't post URLs until I have posted 15 times. No problem.

    Post 6.

  7. #7
    Just Joined!
    Join Date
    Mar 2011
    Posts
    19
    It says I can't post URLs until I have posted 15 times. No problem.

    Post ummmmm.... uhhhhh....

    And anudder one.

  8. #8
    Just Joined!
    Join Date
    Mar 2011
    Posts
    19
    And anudder one.

  9. #9
    Just Joined!
    Join Date
    Mar 2011
    Posts
    19
    And anudder one.

    No duplicate posts allowed within 5 minutes. No probelm

  10. #10
    Just Joined!
    Join Date
    Mar 2011
    Posts
    19
    And anudder one.

    No duplicate posts allowed within 5 minutes. No probelm

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •