Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

obelix

macrumors member
Original poster
Oct 20, 2004
99
0
Ah another of my streaming questions together. I've just setup a webdav server on apache2 on OS X and I have a question regarding webdav. Is it possible to use webdav in conjunction with CURL to upload a file? I know the command in curl is...

curl -T file.png http://localhost/web-dav/file.png

But I keep getting:
The requested method PUT is not allowed for the URL

If I could find a version of mod_put that could work with OS X that would be nice.. but so far no such luck... so webdav is my only option. Any ideas guys?
 

Westside guy

macrumors 603
Oct 15, 2003
6,343
4,160
The soggy side of the Pacific NW
DAV is a completely different protocol than PUT. You can find a lot more info on webdav.org.

PUT has been directly supported by Apache for a number of years now - no module is required. It's just a matter of configuring httpd.conf correctly. But enabling it is a good way to get your system compromised if you're not careful.

Edit: I was just thinking that this would be overkill anyway. You could accomplish the same thing with scp. You'd probably want to set up a specific user account for this and only this, and use a public/private key pair (w/o password) and restrict access to just the particular IP addresses involved. I'm sure that's possible with OS X, although off hand I'm not sure how to do it. :D Did something similar on Linux a few years ago. Maybe someone whose done this more recently, or has more time on their hands to figure it out ;) , will chime in.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.