How do I set Apache Directory Server to port 389 instead of 10389

2.6k views Asked by At

I have a server with Apache Directory Server installed. I can connect using the Apache directory studio over 10389. Now I would like to connect on 389 instead of 10389. I go into (as sudo) /var/lib/apacheds-2.0.0_M23/default/conf/ou\=config/ads-directoryserviceid\=default/ou\=servers/ads-serverid\=ldapserver/ou\=transports/ads-transportid\=ldap.ldif and I set ads-systemPort to

ads-systemPort: 389

However, now when I run I see...

java.io.IOException: Error while binding on /0.0.0.0:389 original message : Permission denied

Changing it back to 10389 works great. I am confused because I am using sudo, which should avoid permission issues. What am I doing wrong?

2

There are 2 answers

0
marabu On

If you start the apache directory server as a service (or like sudo service apacheds... start), it will run as system user apacheds:apacheds and will have permission to listen on any well known port like 389. As a normal user, you usually don't have that permission.

0
Jason On

Change ads-transportAddress to your IP address instead of default value in file ads-transportid\=ldap.ldif.