Ako na vlastný server – VI. (FTP)

Na vytvorenie vlastného FTP servera je vytvorených mnoho ftp serverov, my sa pozrieme na najpoužívanejší – proFTPD. Znova bude tento návod písaný pre distribúciu Debian.

V návode si ukážeme ako prepojiť proFTPD s MySQL.

1, Inštalácia
apt-get install proftpd proftpd-mysql

2, Tabuľka proFTPD v MySQL


CREATE TABLE IF NOT EXISTS `ftpgroup` (
`groupname` varchar(16) NOT NULL default '',
`gid` smallint(6) NOT NULL default '5500',
`members` varchar(16) NOT NULL default '',
KEY `groupname` (`groupname`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='ProFTP group table';
INSERT INTO `ftpgroup` (`groupname`, `gid`, `members`) VALUES
('ftpgroup', 5500, 'ftpuser'),
('ftpgroup', 5500, 'ftpguest');

CREATE TABLE IF NOT EXISTS `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 '/sbin/nologin',
`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',
`webminuid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `userid` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='ProFTP user table' AUTO_INCREMENT=101 ;

INSERT INTO `ftpuser` (`userid`, `passwd`, `uid`, `gid`, `homedir`, `shell`) VALUES
('username', 'password', 5500, 5500, '/dir/', '/sbin/nologin');

3, Spojenie proFTPD s MySQL

# Password type
SQLAuthTypes Plaintext

# Authentication type
SQLAuthenticate users
# Use only SQL when authenticating, and not the system's /etc/passwd
# If the user's information is not in SQL, they're not a user to use
# this server.

AuthOrder mod_sql.c

# DB connect info. Format: database_name@server_address database_username database_password
SQLConnectInfo database@localhost username password

# Default UID/GID. Change to suit needs.
SQLDefaultUID 5500
SQLDefaultGID 5500

# Mininum UID/GID. Change to suit needs.
SQLMinUserUID 33
SQLMinUserGID 33

# Database query. Format: ** defined below **
SQLUserInfo ftpuser userid passwd uid gid homedir shell

5, Dôležitá konfigurácia

UseIPv6 off
DefaultRoot ~

2 771 Responses to “Ako na vlastný server – VI. (FTP)”

  1. Read was interesting, stay in touch……

    [...]please visit the sites we follow, including this one, as it represents our picks from the web[...]……

  2. Foscam FI8910W hovorí:

    Websites worth visiting…

    [...] Just about every now and then we tend to go with blogs that we read. Shown below are the best sites that we consider [...]…

  3. [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……

    [...]Here are some of the sites we recommend for our visitors[...]……

  4. Read was interesting, stay in touch……

    [...]please visit the sites we follow, including this one, as it represents our picks from the web[...]……

  5. sprint training hovorí:

    Recent Blogroll Additions……

    [...]usually posts some very interesting stuff like this. If you’re new to this site[...]……

  6. Budeko hovorí:

    Okna…

    … I couldn’t resist linking to that webpage ……

  7. uk online casino hovorí:

    Superb website…

    [...]always a big fan of linking to bloggers that I love but don’t get a lot of link love from[...]……

  8. webcam models hovorí:

    Great website…

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……

  9. Bradley Spalter hovorí:

    Great website…

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……

  10. Read More…

    [...]…Most Helpful…[...]…

  11. SEO hovorí:

    Visitor recommendations…

    [...]one of our visitors recently recommended the following website[...]……

  12. free hosted blog hovorí:

    Websites worth visiting…

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

  13. Trackback for this entry…

    [...] the best time to study or visit the actual content material or sites we now have linked to just below the [...]…

  14. Serotonin brain hovorí:

    Superb website…

    [...]always a big fan of linking to bloggers that I love but don’t get a lot of link love from[...]……

  15. personal injury hovorí:

    You should check this out…

    [...] Wonderful story, reckoned we could combine a few unrelated data, nevertheless really worth taking a look, whoa did one learn about Mid East has got more problerms as well [...]……

  16. Chiropractor VA hovorí:

    Its hard to find good help…

    I am regularly saying that its difficult to get good help, but here is…

  17. SatelliteMedical internet site…

    […]Stick for the the same manner of employing this article submitting strategy[...]…

  18. Thanks you…

    There are some interesting points in time in this article but I donft know if I see all of them center to heart. There is some validity but I will take hold opinion until I look into it further. Good article , thanks and we want more! Added to FeedBur…

  19. Found=> Recommends Your Site…

    [...]if you want to read a tad bit mоrе then I recommend the following[...]…

  20. Personal Blog…

    [...]below you’ll find the link to some sites that we think you should visit[...]…

  21. freelance jobs hovorí:

    [...]Sites of interest we have a link to[...]……

    [...]usually posts some very interesting stuff like this. If you’re new to this site[...]……

Leave a Reply