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?
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.
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/installin...tabase-servers-on-debian-5.0-with-ispconfig-3
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!
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.
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
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.
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).
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. You have to check that on the slaves, not on the master.
--- 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...
The slave runs a cronjob once a minute, it connects to the master with the master database settings from the config.inc.php file and checks if there are any updates. If it finds updates, it copies the changes to the local database. To debug this, enable debugging for the slave server in ispconfig on the master server under system > server config for this slave server. Then run: crontab -e on the slave and add a # in front of the server.sh cronjob to disable it temporarily. Then run: /usr/local/ispconfig/server/server.sh on the slave as root user and you will get a detailed output of all actions that were taken on the shell. Dont forget to activate the cronjob later again.
I don't know if it's worth mentioning the boxes are virtual machines on ESX server. Does that make a difference? Don't see why it should but grasping at straws here
I dont think that this makes a difference, as long as esx does not try to block mysql network traffic. The most likely reason for your problem is that you used centos or rhel and not debian. The centos standard packages are not well suited for sql based installs like a ispconfig 3 server, they lack compiled in mysql support. Thats why you either have to compile packages manually or use almost all packages from external repositories as described in the perfect server guide. But using so many external sources causes dependency problems on updates and as result, you get a instable system. I can only recommend to everyone who needs a stable system with ispconfig 3 to use debian or ubuntu as these distributions have packages with compiled in mysql support in their default repositories.
Hmm. Well i've carried on my quest and turned on mysql query logging. When a user logs in you can see this: Code: 100927 17:27:50 78 Connect ispconfig@localhost on dbispconfig 78 Query set autocommit=0 78 Query SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '3' AND username="xxx" 78 Query SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '3' AND username="xxx" 78 Query SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '3' AND username="xxx" 78 Query SELECT dir FROM ftp_user WHERE active = 'y' AND server_id = '3' AND username="xxx" 78 Query COMMIT 78 Quit
This shows that pure-ftpd sends a query to mysql, but it does not say if the database connection from ispconfig worked. Please do the debug steps that I suggested to you.
Hi, sorry, I can see that master -> slave replication is working properly - thankyou . If there are no users in the ftp_user table; pureftpd only runs one query, gets 0 rows then shows invalid username message. If there are entries in the table and they match the credentials given to the client, it will run more than one query. When i login to mysql as the same user that pureftpd has to run, and run the same queries it runs, i get a row returned. I get the username, the password, the uid, the directory so it can get the info, it just fails after that which is why I think it's a user-mapping issue. Should it create a new local unix user? Because it doesn't . I might setup a standalone box on ubuntu today and see what the differences are . Someone with working proftpd; can you see one of your ftp accounts and see what the uid field contains then run Code: cat /etc/passwd
proftpd is not supported by ispconfig. ispconfig supports only pure-ftpd. does the web[ID] user and client[ID] group exists in /etc/passwd and /etc/group file?
Sorry, I mean't pureftpd. Didn't get much sleep last night! No no users are created in either file, last 2 lines of each: /etc/passwd: Code: ispapps:x:503:505::/var/www/apps:/bin/bash ispconfig:x:504:506::/usr/local/ispconfig:/bin/bash /etc/group Code: ispapps:x:505: ispconfig:x:506:apache Where's the code that should create the user as part of ajob?
The users are created when the website gets added, not when the ftp user get added as they belong to the website. So there must went something wrong when you created the website. Enable debugging in ispconfig as i described above, then modify a setting in the website were the ftp user belongs to and check the debug output for errors. Also make sure that you have selinux disabled.