pwe pwe - 2 months ago 13
Apache Configuration Question

SVN post-commit as user apache

we are using apache 2.2 and hook scripts for additional acitivities.

Our only authentication is based on ldap and it is working fine.

Now a specific post-commit is trying to run as apache. But this user doesnt exist in LDAP. I get the following error messages:

[Thu Sep 08 09:57:51 2016] [warn] [client <IP>] [24570] auth_ldap authenticate: user apache authentication failed; URI /repo [User not found][No such object]
[Thu Sep 08 09:57:51 2016] [error] [client <IP>] user apache not found: /repo
[Thu Sep 08 09:57:51 2016] [warn] [client <IP>] [24574] auth_ldap authenticate: user apache authentication failed; URI /repo/path/trunk [User not found][No such object]
[Thu Sep 08 09:57:51 2016] [error] [client <IP>] user apache not found: /repo/path/trunk


Here is the definition of the authentification:

AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative On
AuthName "Reponame"
AuthLDAPURL "..."
AuthLDAPBindDN "..."
AuthLDAPBindPassword ...
AuthLDAPGroupAttribute member

# Read-Only
<Limit GET PROPFIND OPTIONS REPORT>
Require ldap-group CN=...
Require ldap-group CN=...
</Limit>
# Read-Write
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require ldap-group CN=...
</LimitExcept>

Order deny,allow
Allow from all


Both solutions: Granting the user apache access to the repo (without password) or using the original login-credentials would be fine for me.

kind regards,
Philipp

Answer

The problem lies in accessing the SVN-Repository via http(s).

You are on your local server so you can either use file:// (with no authentication at all) or you provide the username in question with --username --password switches in cmdline: For example

svn ls http://svn.example.com/repo --username foo --password bar --no-auth-cache

(the --no-auth-cache avoids saving the pw in svns password storage)

Comments