#1  
Old 30th October 2006, 10:16
FreeVPS FreeVPS is offline
Junior Member
 
Join Date: Oct 2006
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default Problem with FTP Quotas

When I have these in my pure-ftpd mysql config file:

Code:
# Optional : query to get the maximal number of files
# Pure-FTPd must have been compiled with virtual quotas support.

# MySQLGetQTAFS  SELECT QuotaFiles FROM users WHERE User="\L"

MySQLGetQTAFS   SELECT QuotaFiles FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")


# Optional : query to get the maximal disk usage (virtual quotas)
# The number should be in Megabytes.
# Pure-FTPd must have been compiled with virtual quotas support.

# MySQLGetQTASZ  SELECT QuotaSize FROM users WHERE User="\L"

MySQLGetQTASZ   SELECT QuotaSize FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
The service won't start however if I comment them out the service runs fine. I'm storing all my details in a table called ftpd all other areas work except this, i've been trying various different ways of amending the sql query but no joy - anyone?
Reply With Quote
Sponsored Links
  #2  
Old 30th October 2006, 14:39
FreeVPS FreeVPS is offline
Junior Member
 
Join Date: Oct 2006
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I've tried running strace on this for about an hour and cannot see why it's failing.

This is all is in my logs:

Oct 30 13:25:57 mercury pure-ftpd: (?@?) [ERROR] Configuration error: Invalid SQL configuration file: /etc/pure-ftpd/mysql.conf
Oct 30 13:26:49 mercury last message repeated 2 times
Oct 30 13:28:02 mercury pure-ftpd: (?@?) [ERROR] Configuration error: Invalid SQL configuration file: /etc/pure-ftpd/mysql.conf
Oct 30 13:31:49 mercury last message repeated 2 times

I'm using Fedora Core 5

As I say above if i remove those two lines it works ok - but if I enable them ftp falls over.
Reply With Quote
  #3  
Old 31st October 2006, 17:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,702 Times in 2,545 Posts
Default

I think you must escape the quotation marks in the two lines:

Code:
MySQLGetQTAFS   SELECT QuotaFiles FROM ftpd WHERE User="\L" AND status=\"1\" AND (ipaccess = \"*\" OR ipaccess LIKE \"\\R\")

MySQLGetQTASZ   SELECT QuotaSize FROM ftpd WHERE User="\L" AND status=\"1\" AND (ipaccess = \"*\" OR ipaccess LIKE \"\\R\")
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 1st November 2006, 12:11
FreeVPS FreeVPS is offline
Junior Member
 
Join Date: Oct 2006
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Same problem

Code:
Nov  1 11:10:17 mercury pure-ftpd: (?@?) [ERROR] Configuration error: Invalid SQL configuration file: /etc/pure-ftpd/mysql.conf
Reply With Quote
  #5  
Old 2nd November 2006, 14:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,702 Times in 2,545 Posts
Default

What's in /etc/pure-ftpd/mysql.conf now?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 1st January 2007, 05:50
perldork perldork is offline
Junior Member
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Hi,

You have to pass

Code:
--with-quotas
to configure to enable the MySQLGetQTASZ and MySQLGetQTAFS configuration directives. Not well documented, I had to search through the source to find the

Code:
#ifdef QUOTAS
section that showed the code and then the configure script itself to find which configure switch caused QUOTAS to be defined for compilation.
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
FTP very ODD problem (imho) Jivedue Server Operation 7 19th September 2006 23:43
ftp problems tgansert Installation/Configuration 20 27th May 2006 19:06
WEB UI FTP not working gimhan90 Installation/Configuration 2 16th March 2006 08:03
Website users? ctroyp General 25 6th January 2006 18:02
FTP access problem... ctroyp General 7 12th October 2005 17:07


All times are GMT +2. The time now is 19:42.


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