Accueil > Informatique > Config_PC > proftpd
proftpd
mardi 26 août 2008, par
proftpd serveur ftp
le fichier de configuration se trouve là :
/etc/proftpd/proftpd.conf (en document joint)
La config est faite pour se connecter et s’identifier à une base mysql.
la doc complète est là : doc ubuntu
Nom de la base : proftpd
mot de passe : password
création de la base :
CREATE DATABASE `proftpd`;
USE proftpd;
création es tables
--
-- Table structure for table `ftpgroup`
--
CREATE TABLE `ftpgroup` (
`groupname` varchar(16) NOT NULL DEFAULT '',
`gid` smallint(6) NOT NULL DEFAULT '5500',
`members` varchar(16) NOT NULL DEFAULT '',
KEY `groupname` (`groupname`)
) TYPE=MyISAM COMMENT='Table des groupes ProFTPD';
--
-- Table structure for table `ftpquotalimits`
--
CREATE TABLE `ftpquotalimits` (
`name` varchar(30) DEFAULT NULL,
`quota_type` enum('user','group','class','all') NOT NULL DEFAULT 'user',
`par_session` enum('false','true') NOT NULL DEFAULT 'false',
`limit_type` enum('soft','hard') NOT NULL DEFAULT 'soft',
`bytes_up_limit` float NOT NULL DEFAULT '0',
`bytes_down_limit` float NOT NULL DEFAULT '0',
`bytes_transfer_limit` float NOT NULL DEFAULT '0',
`files_up_limit` int(10) UNSIGNED NOT NULL DEFAULT '0',
`files_down_limit` int(10) UNSIGNED NOT NULL DEFAULT '0',
`files_transfer_limit` int(10) UNSIGNED NOT NULL DEFAULT '0'
) TYPE=MyISAM COMMENT='Table des quotas ProFTPD';
--
-- Table structure for table `ftpquotatotal`
--
CREATE TABLE `ftpquotatotal` (
`name` varchar(30) NOT NULL DEFAULT '',
`quota_type` enum('user','group','class','all') NOT NULL DEFAULT 'user',
`bytes_up_total` float NOT NULL DEFAULT '0',
`bytes_down_total` float NOT NULL DEFAULT '0',
`bytes_transfer_total` float NOT NULL DEFAULT '0',
`files_up_total` int(10) UNSIGNED NOT NULL DEFAULT '0',
`files_down_total` int(10) UNSIGNED NOT NULL DEFAULT '0',
`files_transfer_total` int(10) UNSIGNED NOT NULL DEFAULT '0'
) TYPE=MyISAM COMMENT='Table des compteurs des quotas ProFTPD';
--
-- Table structure for table `ftpuser`
--
CREATE TABLE `ftpuser` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` varchar(32) NOT NULL DEFAULT '',
`passwd` varchar(32) NOT NULL DEFAULT '',
`uid` smallint(6) NOT NULL DEFAULT '5500',
`gid` smallint(6) NOT NULL DEFAULT '5500',
`homedir` varchar(255) NOT NULL DEFAULT '',
`shell` varchar(16) NOT NULL DEFAULT '/bin/false',
`count` int(11) NOT NULL DEFAULT '0',
`accessed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`LoginAllowed` enum('true','false') NOT NULL DEFAULT 'true',
PRIMARY KEY (`id`)
) TYPE=MyISAM COMMENT='Table des utlisateurs ProFTPD';
Création d’un utilisateur avec les droit en lecture/ecriture :
GRANT SELECT, INSERT, UPDATE, DELETE ON proftpd.* TO 'proftpd'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
Ajouter un utilisteur :
INSERT INTO `ftpuser` ( `id`, `userid`, `passwd`, `uid`, `gid`, `homedir`, `shell`, `count`, `accessed` , `modified`, `LoginAllowed` ) VALUES ('', 'test', ENCRYPT('pwd'), '5500', '5500', '/home/ftp/test', '/bin/false', '', '', '', 'true' );
Voir en ligne : site proftpd