Help with cURL

Hi all;

first of all i need to clarify that i am new to apache2 server configuration and for some needs i want to transfer some files using curl to web directory,so please bear with me:

following is the command i m running to transfer file to my web directory:

curl -T "q" http://localhost/website

where "q" is the name of the file and the response i get is

 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://localhost/website/">here</a>.</p>
<hr>
<address>Apache/2.2.16 (Ubuntu) Server at localhost Port 80</address>
</body></html>

my configuration for httpd.conf looks like

 <Directory /var/www/website>
   Options none
   AllowOverride none
   Order deny,allow
   Deny from all
   <Limit PUT POST GET>
        Order deny,allow
        Allow from all
    </Limit>
</Directory>

where i m allowing PUT option to be used

now the problem is that file "q" does not appear in /var/www/website directory even though after getting moved permanenty message. acording to my understanding what i came to know after reading "man curl" is that -T allows you to transfer files directly to server unlike some scripts what we use in case of forms,correct me if i am wrong.

please share some inputs regarding this which will be more than helpful for me.If possible some sample conf files for working setup.

regards;
arien

What are the permissions and ownerships on that directory? The web server will need write-access.

permissions and ownership: www directory/

drwxr-xr-x  3 www-data www-data 4096 2011-07-28 22:57 www

of website/ directory

drwxr-xr-x  2 www-data www-data 4096 2011-07-28 22:59 website

and snippet from cat passwd

www-data:x:33:33:www-data:/var/www:/bin/sh

have given 0777 permissions to whole www/ dir later

You've given write-access for your web folder to absolutely everything on your system, you might want to fix that. 777 is not the magic sledgehammer to solve all permissions problems.

I've tried to get this operating myself since you asked, and had even less progress than you yet, sorry :wall:

Might this be the problem?

curl -T "q" http://localhost/website/

Reading from man curl: