[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Proftpd



2008/12/4 Francisco Calero <pcm@inproda.es>:
> Acabo de comprobar si el mysql.log refleja algo cuando intento conectar
> al ftp pero no dice nada de nada.
>
> ¿Aguna sujerencia?
> ¿instalo otro servidor diferente?
>
>
> El jue, 04-12-2008 a las 19:34 +0100, Francisco Calero escribió:
>> Hola a todos, llevo un tiempo intentando hacer funcionar el proftpd
> con
>> los usuarios virtuales manejados desde mysql. He seguido numerosos
>> manuales que me presta google y no consigo hacerlo funcionar. Mas
> abajo
>> os dejo mi configuración a ver si alguien puede ayudarme.
>>
>> /etc/proftpd/proftpd.conf
>>
>> Include /etc/proftpd/modules.conf
>> UseIPv6                         off
>> # Use pam to authenticate (default) and be authoritative
>> #AuthPAMConfig                  proftpd
>> #AuthOrder                      mod_auth_pam.c* mod_auth_unix.c
>> # SQL authentication Dynamic Shared Object (DSO) loading
>> # See README.DSO and howto/DSO.html for more details.
>> #<IfModule mod_dso.c>
>> #   LoadModule mod_sql.c
>> #   LoadModule mod_sql_mysql.c
>> #   LoadModule mod_sql_postgres.c
>> #</IfModule>
>>
>>
>> # The passwords in MySQL are encrypted using CRYPT
>> SQLAuthTypes            Plaintext Crypt
>> SQLAuthenticate         users groups
>>
>>
>> # used to connect to the database
>> # databasename@host database_user user_password
>> SQLConnectInfo  ftp@localhost proftpd asdfgf
>>
>>
>> # Here we tell ProFTPd the names of the database columns in the
>> "usertable"
>> # we want it to interact with. Match the names with those in the db
>> SQLUserInfo     ftpuser userid passwd uid gid homedir shell
>>
>> # Here we tell ProFTPd the names of the database columns in the
>> "grouptable"
>> # we want it to interact with. Again the names match with those in the
>> db
>> SQLGroupInfo    ftpgroup groupname gid members
>>
>> # set min UID and GID - otherwise these are 999 each
>> SQLMinID        500
>>
>> # create a user's home directory on demand if it doesn't exist
>> SQLHomedirOnDemand on
>>
>> # Update count every time user logs in
>> SQLLog PASS updatecount
>> SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE
>> userid='%u'" ftpuser
>>
>> # Update modified everytime user uploads or deletes a file
>> SQLLog  STOR,DELE modified
>> SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'"
> ftpuser
>>
>> # User quotas
>> # ===========
>> QuotaEngine on
>> QuotaDirectoryTally on
>> QuotaDisplayUnits Mb
>> QuotaShowQuotas on
>>
>> SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session,
>> limit_type, bytes_in_avail, bytes_out_avail, bytes_xfer_avail,
>> files_in_avail, files_out_avail, files_xfer_avail FROM ftpquotalimits
>> WHERE name = '%{0}' AND quota_type = '%{1}'"
>>
>> SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used,
>> bytes_out_used, bytes_xfer_used, files_in_used, files_out_used,
>> files_xfer_used FROM ftpquotatallies WHERE name = '%{0}' AND
> quota_type
>> = '%{1}'"
>>
>> SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used
> +
>> %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used =
>> bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3},
>> files_out_used = files_out_used + %{4}, files_xfer_used =
>> files_xfer_used + %{5} WHERE name = '%{6}' AND quota_type = '%{7}'"
>> ftpquotatallies
>>
>> SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},
>> %{5}, %{6}, %{7}" ftpquotatallies
>>
>> QuotaLimitTable sql:/get-quota-limit
>> QuotaTallyTable
>> sql:/get-quota-tally/update-quota-tally/insert-quota-tally
>>
>> RootLogin off
>> RequireValidShell off
>>
>> cat /etc/proftpd/modules.conf
>> #
>> # This file is used to manage DSO modules and features.
>> #
>>
>> # This is the directory where DSO modules reside
>>
>> ModulePath /usr/lib/proftpd
>>
>> # Allow only user root to load and unload modules, but allow everyone
>> # to see which modules have been loaded
>>
>> ModuleControlsACLs insmod,rmmod allow user root
>> ModuleControlsACLs lsmod allow user *
>>
>> LoadModule mod_ctrls_admin.c
>> LoadModule mod_tls.c
>> LoadModule mod_sql.c
>> LoadModule mod_ldap.c
>> LoadModule mod_sql_mysql.c
>> LoadModule mod_sql_postgres.c
>> LoadModule mod_quotatab.c
>> LoadModule mod_quotatab_file.c
>> LoadModule mod_quotatab_ldap.c
>> LoadModule mod_quotatab_sql.c
>> LoadModule mod_radius.c
>> LoadModule mod_wrap.c
>> LoadModule mod_rewrite.c
>>
>> # keep this module the last one
>> LoadModule mod_ifsession.c
>>
>> uname -a
>> Linux Calculon 2.6.18-6-amd64 #1 SMP Mon Jun 16 22:30:01 UTC 2008
> x86_64
>> GNU/Linux nmap localhost
>>
>> Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2008-12-04
> 19:30
>> CET
>> Interesting ports on localhost (127.0.0.1):
>> Not shown: 1672 closed ports
>> PORT      STATE SERVICE
>> 21/tcp    open  ftp
>> 22/tcp    open  ssh
>>
>>
>> tcp        0      0 0.0.0.0:21              0.0.0.0:*
>> LISTEN
>>
>> La base de datos la he estructurado segun este howto.
>>
> http://www.howtoforge.com/virtual-hosting-with-proftpd-and-mysql-fedora9
>>
>> Bién una vez seguido y terminado este manual, obtengo lo siguiente.
>>
> ------------------------------------------------------------------------------------
>> ftp localhost
>> Connected to localhost.
>> 421 Service not available, remote server has closed connection
>>
> ------------------------------------------------------------------------------------
>>
>> Agradezco todo tipo de ayudar o sugerencia.
>>
>> Gracias y Salu2.
>
>
>
> --
> To UNSUBSCRIBE, email to debian-user-spanish-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>


Justo estamos viendo el tema de ftp con sql con un amigo.
por lo cual lo que te conteste no es 100 por 100 seguro y no te
garantizo ni un 50 %
pero si te puedo ayudar.
no sirva a ambos.
segun lo que dice el documento el mysql no guardaria losgs del ftp
solo usuarios claves cuotas etc.
datos del usuario.
ahora si tu pregunta viene por el log del mysql, que si el proseso del
ftp al comunicarce con la base de datos, deje una huella de su
coneccion.
la pregunta seria el ftp te permite o no conectarte.

y te cuento que estuvimos probando varios ftp con sql.
incluso el proftp, pero nos gusto mas y lo vimos con mas opciones
interesantes al
pureftp, asi que nos quedamos con el pure. igual solo es un comentario



-- 
MrIX
Linux user number 412793.
http://counter.li.org/

las grandes obras,
las sueñan los santos locos,
las realizan los luchadores natos,
las aprovechan los felices cuerdo,
y las critican los inútiles crónicos,

yo no fui, seguro que es mas inteligente.


Reply to: