You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Leonardo Pedretti <lp...@suserver.com> on 2002/02/19 04:39:50 UTC

DBM and DB User Files not working?

Hi, i'm trying to use apache with dbm user files for authentication 
information. My OS is Slackware Linux 8, I tried the standard apache package, 
apache 1.3.23 compiled with the standard package options (in fact i built the 
1.3.23 package) and apache 1.3.23. with standard configuration adding only 
mod_auth_dbm and without using any shared object (all modules where compiled 
in). The error i am getting is this:

----------------------------------------
[Mon Feb 18 07:53:42 2002] [error] [client 127.0.0.1] (2)No such file or 
directory: could not open dbm auth file: /var/www/pwdfiles/testdb
[Mon Feb 18 07:53:42 2002] [error] [client 127.0.0.1] DBM user suserver not 
found: /var/www/htdocs
----------------------------------------

this is my htaccess file inside /usr/local/apache/htdocs (now i'm testing the 
default apache configuration and installation from source)

----------------------------------------
AuthType Basic
AuthName "Prueba de auth"
AuthDBMUserFile /var/www/pwdfiles/dbtest
AuthDBMGroupFile /var/www/pwdfiles/dbtest
Require valid-user
----------------------------------------

And i have added AuthConfig to the AllowOverride configuration directive 
that's inside the <Directory /usr/local/apache/htdocs> section in the main 
server configuration file. (/usr/local/apache/conf/httpd.conf)

I have created /var/www/pwdfiles/dbtest with the followint command

/usr/local/bin/dbmmanage /var/www/pwdfiles/dbtest adduser suserver

and entering the password by hand.
Apache is running as user nobody group nobody and the file 
/var/www/pwdfiles/dbtest is world readable, and the directory 
/var/www/pwdfiles/ is also world readable, as every directory in the tree to 
reach it.

I have also tried to use DB auth files, getting this error instead:

---------------------------------------------------
[Mon Feb 18 23:08:28 2002] [error] [client 127.0.0.1] (22)Invalid argument: 
could not open db auth file: /test/dbtest
[Mon Feb 18 23:08:28 2002] [error] [client 127.0.0.1] DB user suserver not 
found: /var/www/htdocs
----------------------------------------------------

When compiling apache, it verboses the use of DB3 format for DB auth files. I 
created the db3 file with a php script run using the cgi interpreter of php 
compiled with --with-db3. Php is working ok with the db3 files, they can be 
read from other applications that use db3 with no problems.
Again, i have checked the path and filename in the .htaccess file and it is 
correct (in fact, /test/dbtest is easy to check). The permissions on this 
case are set to 0777 the directory and 0666 the file (i was trying to be sure 
that the problem was not permissions... using 0755 and 0644 gets the same 
result)
As i said before, the results are the same with the standard 1.3.20 
slackware's apache package, 1.3.23 apache package built with the standard 
slackware package options, and 1.3.23 configured with no other options except 
--enable-module=auth_db --enable-module=auth_dbm
(i have tested using only each one of the modules built alone without the 
other, same results)

The final check was to use the newer Berkeley DB, thats 4, configure it and 
compile it without any strage settings except the prefix, and the results 
where the same (db3 databases keep working ok and apache gives the error 
described before with DB auth files)

After all this explanation, i think anybody can reproduce the errors and 
check what's happening, i don't know what else to test, as i have no idea of 
working with db and dbm files except with php, and so i can not check the 
sources to find exactly what's happening.. plz help!! =/

Leonardo

---------------------------------------------------------------------
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org