Re: Re: PUT method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Daniel,

This is starting to make sense.

Maybe you or someone else can tell me if this is possible with HTTP/apache:

Is it possible to define username and password in the http string and
have a machine login automatically to that web directory, just like
you can with FTP, eg ftp://username:password@xxxxxxxx logs you
straight into the ftp server.

If I protect the directory in apache, it always comes up asking for a
username and password when I use a browser, even when I specify it in
the URL,

eg http://username:password@xxxxxxxxxxxxxx

in the browser still asks me for a username and password.  Am I right
in thinking that the HTTP server does not accept the username:password
part of this string and just chops it off?

Below is a packet dump of a telephone trying to upload a log file
using the URL above, apache asks it to authenticate itself, even
thought it was told to use http://username:password@xxxxxxxxxxxxxx

T APACHEIP:80 -> CLIENTIP:1036 [A]
  HTTP/1.1 401 Authorization Required..Date: Wed, 21 May 2008 21:20:32
GMT..Server: A
  pache/2.2.3 (CentOS)..WWW-Authenticate: Basic
realm="PUT"..Content-Length: 489..Con
  nection: close..Content-Type: text/html;
charset=iso-8859-1....<!DOCTYPE HTML PUBLI
  C "-//IETF//DTD HTML 2.0//EN">.<html><head>.<title>401 Authorization
Required</titl
  e>.</head><body>.<h1>Authorization Required</h1>.<p>This server
could not verify th
  at you.are authorized to access the document.requested.  Either you
supplied the wr
  ong.credential
#
T APACHEIP:80 -> CLIENTIP:1036 [AP]
  s (e.g., bad password), or your.browser doesn't understand how to
supply.the creden
  tials required.</p>.<hr>.<address>Apache/2.2.3 (CentOS) Server at
provisioning.xipt
  el.net Port 80</address>.</body></html>.

Thanks in Advance

Robert





















On Wed, May 21, 2008 at 12:32 PM, Danijel Tasov <gmane@xxxxxxxxxxxxx> wrote:
> Robert McNaught wrote:
>> I can see in the access log what the phone is trying to do, but cannot
>> figure out how to allow the PUT method, which from what I gather is
>> pretty uncommon.  I have tried making permissions 777 for the
>> directory the phone is trying to upload to incase that was the issue.
>
> Well, apache does not provide the PUT functionality by itself,
> you have to write a CGI program to handle the PUT request.
>
> Once you have the CGI, the configuration goes as follows:
>
>        # Define a directory for CGI-Skripts
>        ScriptAlias /cgi-bin /usr/lib/cgi-bin
>
>        # Install the PUT handler
>        Script PUT /cgi-bin/put
>
>        # Make sure that the Handler is protected in some way
>        # Well this might be 2.0 syntax, I'm not sure
>        # if it's the same with 2.2
>        <Location /cgi-bin/put>
>          AuthName PUT
>          AuthType Basic
>          AuthUserFile /path/to/user.file
>          require valid-user
>        </Location>
>
> Here you can find a simple PUT script in Python, (but you can write it
> in any language you like, PHP, Perl, C, etc):
>
>  http://users.ictp.it/~its/1999/webworkshop/lectures/douglas/remote.html
>
> It's not very good, but it shows, how it works.
>
> bye,
> Da.Ta
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux