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 ~

4 373 Responses to “Ako na vlastný server – VI. (FTP)”

  1. hayden marks…

    not really relevant but i waiting at the dumb bus station and the only web site i can get on to is the one here regardless it was a good read…

  2. toyo tires jobs hovorí:

    great find…

    If you only see on good nonfictional prose list today….

  3. Paleo Diet hovorí:

    Looking around…

    I like to browse in various places on the online world, regularly I will just go to Digg and follow thru…

  4. Recent Blogroll Additions……

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

  5. Cool sites…

    [...]we came across a cool site that you might enjoy. Take a look if you want[...]……

  6. Informative and precise…

    Its hard to find informative and accurate info but here I found…

  7. Websites you should visit…

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

  8. Awesome website…

    [...]the time to read or visit the content or sites we have linked to below the[...]……

  9. toyo tires cheap hovorí:

    great find…

    If you only see on good piece brand today….

  10. Links…

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

  11. Gems form the internet…

    [...]very few websites that happen to be detailed below, from our point of view are undoubtedly well worth checking out[...]……

  12. cooper tire hovorí:

    great find…

    If you only see on good piece business today….

  13. hi buddy…

    It is my extremely initially occasion i hit up beneath. I discovered countless collaborating content material as part of your respective blog site specifically it really is dialog. From tons of comments in your posts, I assume I m not the only one poss…

  14. Wikia…

    Wika linked to this website…

  15. Comic News hovorí:

    Yahoo results…

    While browsing Yahoo I found this page in the results and I didn’t think it fit…

  16. Dreary Day…

    It was a dreary day here yesterday, so I just took to messing around on the internet and realized…

  17. Sources…

    [...]check below, are some totally unrelated websites to ours, however, they are most trustworthy sources that we use[...]……

  18. check it out hovorí:

    Superb website…

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

  19. ski resorts hovorí:

    News info…

    I was reading the news and I saw this really interesting topic…

  20. Its hard to find good help…

    I am constantnly proclaiming that its hard to find good help, but here is…

  21. erie hovorí:

    … [Trackback]…

    [...] Informations on that Topic: svetserverov.sk/ako-na-vlastny-server-vi-ftp/ [...]…

  22. Its hard to find good help…

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

  23. Gems from the Internet…

    [...] below are a few links to sites that many of us link to merely because we think they are seriously worth visiting [...]…

Leave a Reply