public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Using authentication under Apache for Cygwin
@ 2003-09-30  0:21 Andrew DeFaria
  2003-09-30  0:30 ` Stipe Tolj
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Andrew DeFaria @ 2003-09-30  0:21 UTC (permalink / raw)
  To: cygwin

Now that Apache for Cygwin seems to work more reliably I have started 
using it as my web server. However authentication (that was working with 
Apache for Windows) broke. I'm wondering if this is an Apache for Cygwin 
specific problem.

I used to have this implemented at the server level in the httpd.conf 
file like so:

# Secure addbug form
<Directory "//sonscentral/users/adefaria/www/Internal/Release/addbug/">
    AuthName "permission to add a bug"
    AuthType Basic
    AuthUserFile /etc/apache/addbug_users
    Require valid-user
</Directory>

However that fails to work. The user is let in without being prompted 
for a username/password. I've also tried using a .htaccess file:

AuthType Basic
AuthName "permission to add a bug"
AuthUserFile /etc/apache/addbug_users

Require valid-user

With the same non-success. I had cranked up the loglevel in the hopes 
that something about the failure would be written to the logs but 
nothing is. How can I debug/fix this? Does Apache for Cygwin do any 
authentication at all?

Apache 1.3.24; Cygwin 1.5.4

===
I love defenseless animals, especially in a good gravy



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30  0:21 Using authentication under Apache for Cygwin Andrew DeFaria
@ 2003-09-30  0:30 ` Stipe Tolj
  2003-09-30  2:46   ` Andrew DeFaria
  2003-09-30  1:09 ` Stipe Tolj
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 18+ messages in thread
From: Stipe Tolj @ 2003-09-30  0:30 UTC (permalink / raw)
  To: Andrew DeFaria; +Cc: cygwin

> Now that Apache for Cygwin seems to work more reliably I have started
> using it as my web server. However authentication (that was working with
> Apache for Windows) broke. I'm wondering if this is an Apache for Cygwin
> specific problem.
> 
> I used to have this implemented at the server level in the httpd.conf
> file like so:
> 
> # Secure addbug form
> <Directory "//sonscentral/users/adefaria/www/Internal/Release/addbug/">
>     AuthName "permission to add a bug"
>     AuthType Basic
>     AuthUserFile /etc/apache/addbug_users
>     Require valid-user
> </Directory>
> 
> However that fails to work. The user is let in without being prompted
> for a username/password. I've also tried using a .htaccess file:
> 
> AuthType Basic
> AuthName "permission to add a bug"
> AuthUserFile /etc/apache/addbug_users
> 
> Require valid-user
> 
> With the same non-success. I had cranked up the loglevel in the hopes
> that something about the failure would be written to the logs but
> nothing is. How can I debug/fix this? Does Apache for Cygwin do any
> authentication at all?
> 
> Apache 1.3.24; Cygwin 1.5.4

did you used "AuthGroupFile /dev/null" in this scope too?

I have no clue for this, because Authentication using the standard
mod_auth was working very reliably since decades for me.

BTW, why is the <Director> path starting with *two* slashes? Maybe we
got the raeson for this behaviour at this point.

Stipe

tolj@wapme-systems.de
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info@wapme-systems.de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30  0:21 Using authentication under Apache for Cygwin Andrew DeFaria
  2003-09-30  0:30 ` Stipe Tolj
@ 2003-09-30  1:09 ` Stipe Tolj
  2003-09-30  4:10   ` Andrew DeFaria
  2003-09-30  1:28 ` Brian Dessent
  2003-09-30  9:49 ` S. L.
  3 siblings, 1 reply; 18+ messages in thread
From: Stipe Tolj @ 2003-09-30  1:09 UTC (permalink / raw)
  To: Andrew DeFaria; +Cc: cygwin

> With the same non-success. I had cranked up the loglevel in the hopes
> that something about the failure would be written to the logs but
> nothing is. How can I debug/fix this? Does Apache for Cygwin do any
> authentication at all?

yes it does (or did ;) at least for a considerable time. I don't think
this is a Cygwin or Apache for Cygwin specific problem. I suggest it's
more to a mis-configuration.

Did you try to have standard Basic HTTP Auth on a "fresh" httpd.conf
that comes from the distribution itself?

Stipe

tolj@wapme-systems.de
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info@wapme-systems.de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30  0:21 Using authentication under Apache for Cygwin Andrew DeFaria
  2003-09-30  0:30 ` Stipe Tolj
  2003-09-30  1:09 ` Stipe Tolj
@ 2003-09-30  1:28 ` Brian Dessent
  2003-09-30  9:49 ` S. L.
  3 siblings, 0 replies; 18+ messages in thread
From: Brian Dessent @ 2003-09-30  1:28 UTC (permalink / raw)
  To: cygwin

Andrew DeFaria wrote:

> # Secure addbug form
> <Directory "//sonscentral/users/adefaria/www/Internal/Release/addbug/">

My WAG is that it has something to do with this UNC path.  I don't know
whether the "//" thing is currently deprecated or not, but I do remember
seeing a recent check-in dealing with either removing or re-enabling it,
or something like that.

Why not try putting all that in a .htaccess file in the addbug
directory?

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30  0:30 ` Stipe Tolj
@ 2003-09-30  2:46   ` Andrew DeFaria
  0 siblings, 0 replies; 18+ messages in thread
From: Andrew DeFaria @ 2003-09-30  2:46 UTC (permalink / raw)
  To: cygwin

Stipe Tolj wrote:

>> Now that Apache for Cygwin seems to work more reliably I have started 
>> using it as my web server. However authentication (that was working 
>> with Apache for Windows) broke. I'm wondering if this is an Apache 
>> for Cygwin specific problem.
>>
>> I used to have this implemented at the server level in the httpd.conf 
>> file like so:
>>
>> # Secure addbug form
>> <Directory "//sonscentral/users/adefaria/www/Internal/Release/addbug/">
>> AuthName "permission to add a bug"
>> AuthType Basic
>> AuthUserFile /etc/apache/addbug_users
>> Require valid-user
>> </Directory>
>>
>> However that fails to work. The user is let in without being prompted 
>> for a username/password. I've also tried using a .htaccess file:
>>
>> AuthType Basic
>> AuthName "permission to add a bug"
>> AuthUserFile /etc/apache/addbug_users
>>
>> Require valid-user
>>
>> With the same non-success. I had cranked up the loglevel in the hopes 
>> that something about the failure would be written to the logs but 
>> nothing is. How can I debug/fix this? Does Apache for Cygwin do any 
>> authentication at all?
>>
>> Apache 1.3.24; Cygwin 1.5.4
>
> did you used "AuthGroupFile /dev/null" in this scope too?

Just did (in the .htaccess file). Didn't change anything.

> I have no clue for this, because Authentication using the standard 
> mod_auth was working very reliably since decades for me.
>
> BTW, why is the <Director> path starting with *two* slashes? Maybe we 
> got the raeson for this behaviour at this point.

The two slashes indicate a UNC name. In most aspects of Cygwin/Windows 
slashes can stand in for backslashes and are particularly useful. 
Otherwise one needs to have 
\\\\sonscentral\\users\\adefaria\\www\\Internal\\Release\\addbug\\!

As I said, this configuration was working in Apache for Windows (where I 
was using the <Directory> directive and a path like 
\\sonscentral\users\adefaria\www\Internal\Release\addbug\ - no need to 
double the backslashes for just Windows).
===
5 days a week my body is a temple. The other two, it's an amusement park.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30  1:09 ` Stipe Tolj
@ 2003-09-30  4:10   ` Andrew DeFaria
  2003-09-30  9:56     ` Stipe Tolj
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew DeFaria @ 2003-09-30  4:10 UTC (permalink / raw)
  To: cygwin; +Cc: tolj

Stipe Tolj wrote:

>> With the same non-success. I had cranked up the loglevel in the hopes 
>> that something about the failure would be written to the logs but 
>> nothing is. How can I debug/fix this? Does Apache for Cygwin do any 
>> authentication at all?
>
> yes it does (or did ;) at least for a considerable time. I don't think 
> this is a Cygwin or Apache for Cygwin specific problem. I suggest it's 
> more to a mis-configuration.

I would tend to agree except this config worked with Apache for Windows.

> Did you try to have standard Basic HTTP Auth on a "fresh" httpd.conf 
> that comes from the distribution itself?

Good idea. Tried it. Didn't work:

$ net stop apache
The Cygwin Apache service is stopping........
The Cygwin Apache service was stopped successfully.

$ cd /etc/apache
$ mv httpd.conf httpd.conf.save
$ cp ../apache.new/httpd.conf httpd.conf
$ cp -rp ~/www/Internal/Release/addbug /var/www/htdocs
$ ll /var/www/htdocs/addbug
total 15
drwxr-xr-x+   2 adefaria Domain U        0 Sep 29 19:17 ./
drwx------+   4 adefaria Domain U        0 Sep 29 19:33 ../
-rw-r--r--    1 adefaria Domain U      132 Sep 29 19:17 .htaccess
-rw-r--r--    1 adefaria Domain U       48 Sep 18 16:06 addbug_users
-rw-r--r--    1 adefaria Domain U        8 Sep 27 15:40 current_release
-rwxr-xr-x    1 adefaria Domain U     5293 Sep  9 17:05 index.cgi*
-rwxr-xr-x    1 adefaria Domain U     5233 May 19 17:10 index.cgi.save*

I had to add ExecCGI and index.cgi to httpd.conf but that's all I 
changed. When I went to "addbug" again it let me in there without any 
authentication. Nothing to report in the log files.

Perhaps we should take this offline...
===
Ever stop to think, and forget to start again?



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30  0:21 Using authentication under Apache for Cygwin Andrew DeFaria
                   ` (2 preceding siblings ...)
  2003-09-30  1:28 ` Brian Dessent
@ 2003-09-30  9:49 ` S. L.
  2003-09-30 21:40   ` Andrew DeFaria
  3 siblings, 1 reply; 18+ messages in thread
From: S. L. @ 2003-09-30  9:49 UTC (permalink / raw)
  To: cygwin

[...]
> # Secure addbug form
> <Directory "//sonscentral/users/adefaria/www/Internal/Release/addbug/">
>     AuthName "permission to add a bug"
>     AuthType Basic
>     AuthUserFile /etc/apache/addbug_users
>     Require valid-user
> </Directory>
> 
> However that fails to work.
[...]

An "AllowOverride AuthConfig" directive, must also be placed.
E.g. 

<Directory "/your/directory/here">
    Options Indexes FollowSymLinks
    AllowOverride AuthConfig
    order deny,allow
    allow from all
</Directory>
 
and placing all authentication stuff in .htaccess, should do it.

SLao

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30  4:10   ` Andrew DeFaria
@ 2003-09-30  9:56     ` Stipe Tolj
  2003-09-30 21:43       ` Andrew DeFaria
  0 siblings, 1 reply; 18+ messages in thread
From: Stipe Tolj @ 2003-09-30  9:56 UTC (permalink / raw)
  To: Andrew DeFaria; +Cc: cygwin

> I would tend to agree except this config worked with Apache for Windows.

which does not mean that Apache for Cygwin acts the same way as the
native Win32 counterpart.

I'm not sure if you can use network resource location that way as you
can in Apache for Windows. I would guess not.

Stipe

tolj@wapme-systems.de
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info@wapme-systems.de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30  9:49 ` S. L.
@ 2003-09-30 21:40   ` Andrew DeFaria
  0 siblings, 0 replies; 18+ messages in thread
From: Andrew DeFaria @ 2003-09-30 21:40 UTC (permalink / raw)
  To: cygwin

S. L. wrote:

> [...]
>
>> # Secure addbug form
>> <Directory "//sonscentral/users/adefaria/www/Internal/Release/addbug/">
>> AuthName "permission to add a bug"
>> AuthType Basic
>> AuthUserFile /etc/apache/addbug_users
>> Require valid-user
>> </Directory>
>>
>> However that fails to work.
>
> [...]
>
> An "AllowOverride AuthConfig" directive, must also be placed. E.g.
>
> <Directory "/your/directory/here">
> Options Indexes FollowSymLinks
> AllowOverride AuthConfig
> order deny,allow
> allow from all
> </Directory>
>
> and placing all authentication stuff in .htaccess, should do it.

Actually my <Directory /> had AllowOverried all. I tried:

# Secure addbug form
<Directory "//sonscentral/users/adefaria/www/Internal/Release/addbug/">
    Options Indexes FollowSymLinks
    AllowOverride AuthConfig
    order deny,allow
    allow from all
    AuthName "permission to add a bug"
    AuthType Basic
    AuthUserFile /etc/apache/addbug_users
    Require valid-user
</Directory>

And

# Secure addbug form
<Directory "//sonscentral/users/adefaria/www/Internal/Release/addbug/">
    Options Indexes FollowSymLinks
    AllowOverride AuthConfig
    order deny,allow
    allow from all
#    AuthName "permission to add a bug"
#    AuthType Basic
#    AuthUserFile /etc/apache/addbug_users
#    Require valid-user
</Directory>

With the .htaccess file. Neither method worked. I was allowed in without 
any authentication.
===
There's too much blood in my caffeine system.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30  9:56     ` Stipe Tolj
@ 2003-09-30 21:43       ` Andrew DeFaria
  2003-09-30 22:31         ` Igor Pechtchanski
  2003-09-30 22:32         ` Stipe Tolj
  0 siblings, 2 replies; 18+ messages in thread
From: Andrew DeFaria @ 2003-09-30 21:43 UTC (permalink / raw)
  To: cygwin

Stipe Tolj wrote:

>> I would tend to agree except this config worked with Apache for Windows.
>
> which does not mean that Apache for Cygwin acts the same way as the 
> native Win32 counterpart.
>
> I'm not sure if you can use network resource location that way as you 
> can in Apache for Windows. I would guess not.

Well I can use the network resource location in the sense that the 
server does read the web pages/scripts and presents/executes them. It's 
just the authentication that fails. If it can read 
//server/share/path/index.html then why can't is read 
//server/share/path/.htaccess?

Besides I recreated a bare environment and copied my stuff from the 
server to /var/www/htdocs/addbug with the same error.
===
Error, no keyboard - press F1 to continue.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30 21:43       ` Andrew DeFaria
@ 2003-09-30 22:31         ` Igor Pechtchanski
  2003-10-01  0:25           ` Andrew DeFaria
  2003-09-30 22:32         ` Stipe Tolj
  1 sibling, 1 reply; 18+ messages in thread
From: Igor Pechtchanski @ 2003-09-30 22:31 UTC (permalink / raw)
  To: Andrew DeFaria; +Cc: cygwin

On Tue, 30 Sep 2003, Andrew DeFaria wrote:

> Stipe Tolj wrote:
>
> >> I would tend to agree except this config worked with Apache for Windows.
> >
> > which does not mean that Apache for Cygwin acts the same way as the
> > native Win32 counterpart.
> >
> > I'm not sure if you can use network resource location that way as you
> > can in Apache for Windows. I would guess not.
>
> Well I can use the network resource location in the sense that the
> server does read the web pages/scripts and presents/executes them. It's
> just the authentication that fails. If it can read
> //server/share/path/index.html then why can't is read
> //server/share/path/.htaccess?
>
> Besides I recreated a bare environment and copied my stuff from the
> server to /var/www/htdocs/addbug with the same error.

Andrew,

Could this be a text vs. binary issue?  I'm grasping at straws here...
It's good that you've moved everything to the local disk - it helps to
eliminate as many variables as possible.  Did you get an authenticated
access webpage (.html, as opposed to a CGI script) working?  Can you
initially create the user file in the directory where you're trying to set
up authentication (for testing purposes)?  Can you show the output of "ls
-la" in that directory?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30 21:43       ` Andrew DeFaria
  2003-09-30 22:31         ` Igor Pechtchanski
@ 2003-09-30 22:32         ` Stipe Tolj
  1 sibling, 0 replies; 18+ messages in thread
From: Stipe Tolj @ 2003-09-30 22:32 UTC (permalink / raw)
  To: Andrew DeFaria; +Cc: cygwin

Andrew DeFaria wrote:
> 
> Besides I recreated a bare environment and copied my stuff from the
> server to /var/www/htdocs/addbug with the same error.

at least you're the first reporting this kind of behaviour.

Did you try to use the httpd.conf.dist "distribution configuration"?

Stipe

tolj@wapme-systems.de
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info@wapme-systems.de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-09-30 22:31         ` Igor Pechtchanski
@ 2003-10-01  0:25           ` Andrew DeFaria
  2003-10-01  1:11             ` Igor Pechtchanski
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew DeFaria @ 2003-10-01  0:25 UTC (permalink / raw)
  To: cygwin

Igor Pechtchanski wrote:

> Andrew,
>
> Could this be a text vs. binary issue? I'm grasping at straws here... 
> It's good that you've moved everything to the local disk - it helps to 
> eliminate as many variables as possible. Did you get an authenticated 
> access webpage (.html, as opposed to a CGI script) working? Can you 
> initially create the user file in the directory where you're trying to 
> set up authentication (for testing purposes)? Can you show the output 
> of "ls -la" in that directory?

It seems to be an issue of using a UNC path. The following works fine:

<VirtualHost adefaria>
  ServerName adefaria
  ServerAdmin ADeFaria@Salira.com
  DocumentRoot "/var/www/htdocs"
#  DocumentRoot "//sonscentral/users/adefaria/www"
  <Directory "/var/www/htdocs">
#  <Directory "//sonscentral/users/adefaria/www">
    Options Indexes FollowSymLinks MultiViews ExecCGI
  </Directory>
<Directory "/var/www/htdocs/addbug">
#<Directory "//sonscentral/users/adefaria/www/addbug">
    Options Indexes FollowSymLinks MultiViews ExecCGI
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all
</Directory>

</VirtualHost>

If, however, I uncomment the things like DocumentRoot, etc and comment 
out their corresponding line then it fails to work. Note that the 
directory "addbug" was simply copied over so the contents are the same. 
Text vs. binary does not seem to be the issue.

It's funny because the server itself can get html files from a UNC path 
but seems to trip up when attempting to get the .htaccess file (I guess).

Note that originally I was not using .htaccess files at all, instead I 
would code the Auth stuff directly into the <Directory> directive. But 
that wasn't working. So I switched to trying the .htaccess method. It 
seems that using .htaccess does not work if the path is a UNC path. 
Tomorrow I'll try to find out why using Auth... in the <Directory> 
directive didn't work either.

To me this seems like a bug in Apache for Cygwin. Either it should 
support UNC paths fully or not at all.

Again, as I said before, when using Apache for Windows (and using UNCs 
with \\ as Windows likes) it worked fine (with the Auth stuff in 
<Directory>).

Oh and the observent will not that yes I am using Virtual hosts. Perhaps 
that's another factor.
===
Change is inevitable, except from a vending machine.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-10-01  0:25           ` Andrew DeFaria
@ 2003-10-01  1:11             ` Igor Pechtchanski
  2003-10-01  6:55               ` Andrew DeFaria
  0 siblings, 1 reply; 18+ messages in thread
From: Igor Pechtchanski @ 2003-10-01  1:11 UTC (permalink / raw)
  To: Andrew DeFaria; +Cc: cygwin

On Tue, 30 Sep 2003, Andrew DeFaria wrote:

> Igor Pechtchanski wrote:
>
> > Andrew,
> >
> > Could this be a text vs. binary issue? I'm grasping at straws here...
> > It's good that you've moved everything to the local disk - it helps to
> > eliminate as many variables as possible. Did you get an authenticated
> > access webpage (.html, as opposed to a CGI script) working? Can you
> > initially create the user file in the directory where you're trying to
> > set up authentication (for testing purposes)? Can you show the output
> > of "ls -la" in that directory?
>
> It seems to be an issue of using a UNC path. The following works fine:
>
> <VirtualHost adefaria>
>   ServerName adefaria
>   ServerAdmin ADeFaria@Salira.com
>   DocumentRoot "/var/www/htdocs"
> #  DocumentRoot "//sonscentral/users/adefaria/www"
>   <Directory "/var/www/htdocs">
> #  <Directory "//sonscentral/users/adefaria/www">
>     Options Indexes FollowSymLinks MultiViews ExecCGI
>   </Directory>
> <Directory "/var/www/htdocs/addbug">
> #<Directory "//sonscentral/users/adefaria/www/addbug">
>     Options Indexes FollowSymLinks MultiViews ExecCGI
>     AllowOverride AuthConfig
>     Order allow,deny
>     Allow from all
> </Directory>
>
> </VirtualHost>
>
> If, however, I uncomment the things like DocumentRoot, etc and comment
> out their corresponding line then it fails to work. Note that the
> directory "addbug" was simply copied over so the contents are the same.
> Text vs. binary does not seem to be the issue.
>
> It's funny because the server itself can get html files from a UNC path
> but seems to trip up when attempting to get the .htaccess file (I guess).
>
> Note that originally I was not using .htaccess files at all, instead I
> would code the Auth stuff directly into the <Directory> directive. But
> that wasn't working. So I switched to trying the .htaccess method. It
> seems that using .htaccess does not work if the path is a UNC path.
> Tomorrow I'll try to find out why using Auth... in the <Directory>
> directive didn't work either.
>
> To me this seems like a bug in Apache for Cygwin. Either it should
> support UNC paths fully or not at all.
>
> Again, as I said before, when using Apache for Windows (and using UNCs
> with \\ as Windows likes) it worked fine (with the Auth stuff in
> <Directory>).
>
> Oh and the observent will not that yes I am using Virtual hosts. Perhaps
> that's another factor.

Andrew,

Perhaps you could try playing with the permissions on the .htaccess file
to see if you can reproduce the problem in your local directory.  If you
manage to do that, you could see if this is a "smbntsec" issue.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-10-01  1:11             ` Igor Pechtchanski
@ 2003-10-01  6:55               ` Andrew DeFaria
  2003-10-01  7:34                 ` Brian Dessent
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew DeFaria @ 2003-10-01  6:55 UTC (permalink / raw)
  To: cygwin

Igor Pechtchanski wrote:

> Andrew,
>
> Perhaps you could try playing with the permissions on the .htaccess 
> file to see if you can reproduce the problem in your local directory. 
> If you manage to do that, you could see if this is a "smbntsec" issue.

Hmmm... As I said it appears to work in the local case. Or are you 
saying I should try to break that by playing with permissions? Are there 
any examples of "smbntsec" issues?

I mean I suspect that if I do something as small as remove read 
permission for other on .htaccess then the server will not be able to 
read the file thus it would break. But what would that tell me? What 
exactly am I looking for?

I may play with this as you suggest tomorrow at work. At home I don't 
use SMB for my web site - at least not yet.
===
Obligatory witty line: Backup not found: (A)bort (R)etry (P)anic



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-10-01  6:55               ` Andrew DeFaria
@ 2003-10-01  7:34                 ` Brian Dessent
  2003-10-01 18:48                   ` Andrew DeFaria
  0 siblings, 1 reply; 18+ messages in thread
From: Brian Dessent @ 2003-10-01  7:34 UTC (permalink / raw)
  To: cygwin

Andrew DeFaria wrote:

> Hmmm... As I said it appears to work in the local case. Or are you
> saying I should try to break that by playing with permissions? Are there
> any examples of "smbntsec" issues?
> 
> I mean I suspect that if I do something as small as remove read
> permission for other on .htaccess then the server will not be able to
> read the file thus it would break. But what would that tell me? What
> exactly am I looking for?
> 
> I may play with this as you suggest tomorrow at work. At home I don't
> use SMB for my web site - at least not yet.

As a temporary solution, what happens if you mount the SMB share as a
drive and then use "/cygdrive/x/path" instead of the UNC style
"//machine/share/path"?  If that made it work then it might indicate
that it's the path handling code somewhere (i.e. Apache not liking // as
a valid posix path) versus a permissions problem.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-10-01  7:34                 ` Brian Dessent
@ 2003-10-01 18:48                   ` Andrew DeFaria
  2003-10-02  8:50                     ` S. L.
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew DeFaria @ 2003-10-01 18:48 UTC (permalink / raw)
  To: cygwin

Brian Dessent wrote:

> Andrew DeFaria wrote:
>
>> Hmmm... As I said it appears to work in the local case. Or are you 
>> saying I should try to break that by playing with permissions? Are 
>> there any examples of "smbntsec" issues?
>>
>> I mean I suspect that if I do something as small as remove read 
>> permission for other on .htaccess then the server will not be able to 
>> read the file thus it would break. But what would that tell me? What 
>> exactly am I looking for?
>>
>> I may play with this as you suggest tomorrow at work. At home I don't 
>> use SMB for my web site - at least not yet.
>
> As a temporary solution, what happens if you mount the SMB share as a 
> drive and then use "/cygdrive/x/path" instead of the UNC style 
> "//machine/share/path"? If that made it work then it might indicate 
> that it's the path handling code somewhere (i.e. Apache not liking // 
> as a valid posix path) versus a permissions problem.

Ah this works! And I get much shorter and consistent (in my mind) 
pathnames in my httpd.conf file! What I did is mount -bsf 
//sonscentral/users/adefaria/www /www. Now my DocumentRoot is simple 
/www, etc!

So, to summarize, it appears that Apache under Cygwin is able to deal 
with web pages when paths are UNC paths of the form 
//<server>/<share>/<path>/<file> however the authentication module does 
not like such paths and seems to fail silently. Personally I believe 
that if the server can accept an UNC path then the authentication module 
should to likewise.

Workarounds include moving your web site to your local drive (not a nice 
option for me because then it won't be backed up, which is why I stored 
it remotely), mount the remote location locally or make a symlink 
pointing to the remote location (I believe that worked too).

Thanks for the help all.
===
BREAKFAST.COM Halted...Cereal Port Not Responding



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Using authentication under Apache for Cygwin
  2003-10-01 18:48                   ` Andrew DeFaria
@ 2003-10-02  8:50                     ` S. L.
  0 siblings, 0 replies; 18+ messages in thread
From: S. L. @ 2003-10-02  8:50 UTC (permalink / raw)
  To: cygwin

[...]
> So, to summarize, it appears that Apache under Cygwin is able to deal 
> with web pages when paths are UNC paths of the form 
> //<server>/<share>/<path>/<file> however the authentication module does 
> not like such paths and seems to fail silently. Personally I believe 
> that if the server can accept an UNC path then the authentication module 
> should to likewise.
[...]

I would also add the other issue Igor pointed out: maybe with a proper tuned
smbntsec/ntsec option it could also work. I.e. what's the case with w9x (no
ntsec involved)?

SLao

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2003-10-02  8:38 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-30  0:21 Using authentication under Apache for Cygwin Andrew DeFaria
2003-09-30  0:30 ` Stipe Tolj
2003-09-30  2:46   ` Andrew DeFaria
2003-09-30  1:09 ` Stipe Tolj
2003-09-30  4:10   ` Andrew DeFaria
2003-09-30  9:56     ` Stipe Tolj
2003-09-30 21:43       ` Andrew DeFaria
2003-09-30 22:31         ` Igor Pechtchanski
2003-10-01  0:25           ` Andrew DeFaria
2003-10-01  1:11             ` Igor Pechtchanski
2003-10-01  6:55               ` Andrew DeFaria
2003-10-01  7:34                 ` Brian Dessent
2003-10-01 18:48                   ` Andrew DeFaria
2003-10-02  8:50                     ` S. L.
2003-09-30 22:32         ` Stipe Tolj
2003-09-30  1:28 ` Brian Dessent
2003-09-30  9:49 ` S. L.
2003-09-30 21:40   ` Andrew DeFaria

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).