Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th September 2010, 12:34
Xenocide Xenocide is offline
Member
 
Join Date: Sep 2010
Posts: 56
Thanks: 12
Thanked 8 Times in 7 Posts
Default pure-ftpd user login - how does it work?

Hi Guys,

I'm still struggling with my setup here.

My setup is 2 servers with the panel on the db server.

My web server is setup with pure-ftpd, I can create a user in the panel but get the error when trying to connect:

Code:
Response:	220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response:	220-You are user number 1 of 50 allowed.
Response:	220-Local time is now 11:06. Server port: 21.
Response:	220-This is a private system - No anonymous login
Response:	220 You will be disconnected after 15 minutes of inactivity.
Command:	USER xxx
Response:	331 User xxx OK. Password required
Command:	PASS ***
Response:	530 Login authentication failed
Error:	Critical error
Error:	Could not connect to server
So I looked in the /etc/pure-ftpd/pure-ftpd-mysql.conf and it was pointing at the local MySQL DB (ispconfig master DB is on the other server) so I changed that, I can see the user in the ftp_user table, When I run the query defined in the conf file to get the uid "web3" which doesn't seem to exist in either server's /etc/passwd file - or am I missing something here?

Is my logic correct in the assumption of how FTP user mapping works?

Anyone got any ideas of what's going wrong anywhere?
Reply With Quote
Sponsored Links
  #2  
Old 24th September 2010, 12:45
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,983
Thanks: 825
Thanked 5,372 Times in 4,219 Posts
Default

In a ISPConfig 3 setup, every server needs a local mysql server for the dbispconfig database as ispconfig requires this to sync settings in a multiserver install. A external mysql server can be used for client databases but not for the ispconfig db itself, thats why yiou have to enter "localhost" as mysql server when you install ispconfig.

If you accidently used a extrenal mailserver, then I recommend that you reinstall ispconfig so that the ispconfig database is installed on the local server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 24th September 2010, 12:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,983
Thanks: 825
Thanked 5,372 Times in 4,219 Posts
Default

Here are the instructions on how to split a ispconfig onstall to serveral servers, e.g. like your setup to use a external database server for client databases:

http://www.howtoforge.com/installing...th-ispconfig-3
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 24th September 2010, 13:06
Xenocide Xenocide is offline
Member
 
Join Date: Sep 2010
Posts: 56
Thanks: 12
Thanked 8 Times in 7 Posts
Default

Hi, that's the one I followed (I run rhel5 though).

My web server does have a local db, when it's pointing at that the same error occurs!
Reply With Quote
  #5  
Old 24th September 2010, 13:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,983
Thanks: 825
Thanked 5,372 Times in 4,219 Posts
Default

1) Make sure that the db server for pure-ftpd is changed back to localhost.
2) Check the ispconfig database on localhost on the webserver if it contains the record for the FTP user.
3) Check the ispconfig.log file on the webserver if it contains errors.
4) Check the monitor on the master server for errors.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 27th September 2010, 11:42
Xenocide Xenocide is offline
Member
 
Join Date: Sep 2010
Posts: 56
Thanks: 12
Thanked 8 Times in 7 Posts
Default

Hi thanks for your reply. I've put all the conf files back to how they were.

On the front end server I changed the password for the ftp user thus:

Code:
UPDATE `ftp_user` SET `password` = md5('fef');
and changed /etc/pure-ftpd/pureftpd-mysql.conf to use md5 encryption instead of crypt - it still didn't connect .

I then ran
Code:
SELECT `password` FROM `ftp_user`;
and got the md5 sum of the password i'd just set. I then put the config file back to crypt and changed the ftp user's password through the ispconfig panel and reran that query (^) - I got the same result so ispconfig isn't updating the local database.

I'm thinking maybe i've cocked up a config step somewhere, any ideas where? ispconfig was installed with localhost as the database server. :/

[Edit: Oh yeah, I forgot to mention, the log file is just filled up with this:]

Code:
[root@tupac pure-ftpd]# tail -f /var/log/ispconfig/ispconfig.log
27.09.2010-10:39 - ERROR - Modules directory missing: /usr/local/ispconfig/server/mods-enabled/
27.09.2010-10:39 - ERROR - Plugin directory missing: /usr/local/ispconfig/server/plugins-enabled/
27.09.2010-10:40 - ERROR - Modules directory missing: /usr/local/ispconfig/server/mods-core/
27.09.2010-10:40 - ERROR - Plugin directory missing: /usr/local/ispconfig/server/plugins-core/
27.09.2010-10:41 - ERROR - Modules directory missing: /usr/local/ispconfig/server/mods-core/
27.09.2010-10:41 - ERROR - Plugin directory missing: /usr/local/ispconfig/server/plugins-core/
27.09.2010-10:42 - ERROR - Modules directory missing: /usr/local/ispconfig/server/mods-core/
27.09.2010-10:42 - ERROR - Plugin directory missing: /usr/local/ispconfig/server/plugins-core/
27.09.2010-10:43 - ERROR - Modules directory missing: /usr/local/ispconfig/server/mods-core/
27.09.2010-10:43 - ERROR - Plugin directory missing: /usr/local/ispconfig/server/plugins-core/
Just to confirm, this is my /usr/local/ispconfig/interface/lib/config.inc.php file:

Code:
//** Database
$conf["db_type"] = 'mysql';
$conf["db_host"] = 'localhost';
$conf["db_database"] = 'dbispconfig';
$conf["db_user"] = 'ispconfig';
$conf["db_password"] = xxx
$conf["db_charset"] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1")

define("DB_TYPE",$conf["db_type"]);
define("DB_HOST",$conf["db_host"]);
define("DB_DATABASE",$conf["db_database"]);
define("DB_USER",$conf["db_user"]);
define("DB_PASSWORD",$conf["db_password"]);
define("DB_CHARSET",$conf["db_charset"]);


//** Database settings for the master DB. This setting is only used in multiserver setups
$conf["dbmaster_type"]                  = 'mysql';
$conf["dbmaster_host"]                  = xxx (the database server)
$conf["dbmaster_database"]              = 'dbispconfig';
$conf["dbmaster_user"]                  = 'ispcsrv2';
$conf["dbmaster_password"]              = xx

Last edited by Xenocide; 27th September 2010 at 11:47. Reason: Log file
Reply With Quote
  #7  
Old 27th September 2010, 11:48
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,983
Thanks: 825
Thanked 5,372 Times in 4,219 Posts
Default

Quote:
I'm thinking maybe i've cocked up a config step somewhere, any ideas where?
Most likely there is a problem with the hosts and access scheme for mysql.

1) Ensure that you edited the hosts files in all servers of this cluster as the tutorial describes.
2) Ensure that you are able to access the master mysql database from all other hosts by using the hostname of the master.
3) Ensure that you used "localhost" for the local mysql database and the hostname of the master database when the installer asked you for the master database hostname.

If you used anywhere a IP address when setting up the mysql connections instead of the hostname or when one of the hostnames is not set in the /etc/hosts file in one of the nodes, the setup will fail.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 27th September 2010, 11:52
Xenocide Xenocide is offline
Member
 
Join Date: Sep 2010
Posts: 56
Thanks: 12
Thanked 8 Times in 7 Posts
Default

Thankyou for your reply - you're being fantastic!! <3

I'm just checking the config files for everything I can think of. The master server's config.inc.php file says this:

Code:
//** Database settings for the master DB. This setting is only used in multiserver setups
$conf["dbmaster_type"]                  = 'mysql';
$conf["dbmaster_host"]                  = '';
$conf["dbmaster_database"]              = 'dbispconfig';
$conf["dbmaster_user"]                  = '';
$conf["dbmaster_password"]              = xxx
That can't be right... can it? (host is blank).

I can connect to the master db using the credentials in the config.inc.php file from mysql-cli on the remote server (that's a mouthful).
Reply With Quote
  #9  
Old 27th September 2010, 12:20
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,983
Thanks: 825
Thanked 5,372 Times in 4,219 Posts
Default

Quote:
That can't be right... can it? (host is blank).
That setting is correct. The master does not have to connect to the master as it is the master. This has to be empty, if not, the master would become a slave and will fail to run as there is no master then anymore in the setup.

Quote:
I can connect to the master db using the credentials in the config.inc.php file from mysql-cli on the remote server (that's a mouthful).
You have to check that on the slaves, not on the master.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 27th September 2010, 12:23
Xenocide Xenocide is offline
Member
 
Join Date: Sep 2010
Posts: 56
Thanks: 12
Thanked 8 Times in 7 Posts
 
Default

--- ignore this - I found the debug log file setting ---

Right so I can see the settings are replicating properly now. Still can't connect to FTP with that user though. Just to confirm pureftpd-mysql.conf says localhost on the web server.

So back to my original question -

How does the ftp service facilitate different users? I can see it get the uid values from the db - what does it do with these? There's no entry in /etc/passwd, I guess it's creating a unix user and connecting as this but maybe not...

Last edited by Xenocide; 27th September 2010 at 12:34.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to Receve Email walner8080 Installation/Configuration 8 30th September 2010 05:58
Can't access to my website - after install problem pallermo Installation/Configuration 18 4th June 2010 13:29
Vhosts...conf not synced to changes crypted General 50 24th April 2010 00:54
squirrelmail and postfix witoszek General 12 1st December 2009 18:07
Postfix can't received email from exterior astra2000 Server Operation 5 17th October 2009 23:26


All times are GMT +2. The time now is 22:21.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.