diff --git a/copy/tmp/proftpd.conf b/copy/tmp/proftpd.conf index 3cad283..c5d2029 100644 --- a/copy/tmp/proftpd.conf +++ b/copy/tmp/proftpd.conf @@ -42,8 +42,8 @@ SQLAuthenticate users # MySQL queries # username, passwd, uid, gid, homedir, shell -SQLNamedQuery get-user-by-name SELECT "DISTINCT ftp.name, ftp.password, 847 as uid, 847 as gid, IF(ftp.vhost_id is Null, '/var/www', CONCAT('/var/www/', vhost.name, '.', domain.name, '/', ftp.path) ) as homedir, '/bin/false' as shell FROM ftp_account ftp, kumquat_domain domain, web_vhost vhost WHERE ((ftp.vhost_id = vhost.id AND vhost.domain_id = domain.id) OR ftp.vhost_id is NULL) AND ftp.name = '%U'" -SQLNamedQuery get-user-by-id SELECT "'www' as name, 847 as uid, 847 as gid, '/var/www' as homedir, '/bin/false' as shell" +SQLNamedQuery get-user-by-name SELECT "DISTINCT ftp.name, ftp.password, WWW_UID as uid, WWW_GID as gid, IF(ftp.vhost_id is Null, '/var/www', CONCAT('/var/www/', vhost.name, '.', domain.name, '/', ftp.path) ) as homedir, '/bin/false' as shell FROM ftp_account ftp, kumquat_domain domain, web_vhost vhost WHERE ((ftp.vhost_id = vhost.id AND vhost.domain_id = domain.id) OR ftp.vhost_id is NULL) AND ftp.name = '%U'" +SQLNamedQuery get-user-by-id SELECT "'www' as name, WWW_UID as uid, WWW_GID as gid, '/var/www' as homedir, '/bin/false' as shell" SQLUserInfo custom:/get-user-by-name/get-user-by-id # Default MySQL / UID values