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. 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[...]……

  22. Energetikai tanúsítvány…

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

  23. Shake Recipe hovorí:

    Looking around…

    I like to look around the internet, regularly I will just go to Digg and follow thru…

  24. impress a girl hovorí:

    Other sites I like…

    [...]right here are actually a few links to web sites that I also link to because we believe they are actually worth paying a visit to[...]…

  25. nba tickets hovorí:

    News info…

    I was reading the news and I saw this really cool info…

  26. 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…

  27. Pickup Artist hovorí:

    Pick Up Mag…

    [...]here are simply some links to sites that we also link to because I know they are worth going to[...]…

  28. A Bizopp website Recommends Your Site…

    [...]here couple оf links tо sites we connect to beсаuѕе we presume they're worth visiting[...]…

  29. Discount Yankee Candles…

    [...]while the sites we link to below are completely unrelated to ours, we think they are worth a read, so have a look[...]…

  30. Informative and precise…

    Its difficult to find informative and accurate information but here I found…

  31. life insurance hovorí:

    Websites we think you should visit…

    [...]although websites we backlink to below are considerably not related to ours, we feel they are actually worth a go through, so have a look[...]……

  32. Binder Clips hovorí:

    abridge…

    I need some help. I have a home network. I use router to connect my computers and share the Internet connection. I have a real IP-address. Inside of my home network I have a few computers with Windows 7 Ultimate. These computers have local network IP-a…

  33. nomor togel jitu hovorí:

    Read was interesting, stay in touch……

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

  34. etizolam hovorí:

    Check this out……

    [...] may possibly have used up the lack of this points motivated by means of your self on [...]…

  35. buy mdai hovorí:

    Awesome webpage…

    [...] Ever previously think about where to go to for just about any weekend and find yourself heading nowhere but thinking you had [...]…

  36. Read More…

    [...]…We appreciate this blog post…[...]…

  37. Just Browsing…

    While I was browsing yesterday I noticed a great post concerning…

  38. News info…

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

  39. Resveratrol NZ hovorí:

    Resveratrol…

    [...]Resveratrol supplement is actually a poly – phenolic compound found in many meals for example grapes[...]…

  40. Dreary Day…

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

  41. cover hovorí:

    Dreary Day…

    It was a dreary day here yesterday, so I just took to piddeling around online and realized…

  42. Read was interesting, stay in touch……

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

  43. Arigatou…

    Hello! I just would like to give a huge thumbs up for the great info you have here on this post. I will be coming back to your blog for more soon….

  44. truyen ma hovorí:

    truyen ma, nghe doc truyen ma kinh di…

    I had to say here best foums. truyen ma kinh di…

  45. abelia…

    I must say your blog is outstanding! I will definitely come back again!…

  46. Just Browsing…

    While I was browsing yesterday I saw a excellent article concerning…

  47. hello…

    you have a great blog here! would you like to make some invite posts on my blog?…

  48. game avatar. huong dan choi game avatar tren may tinh…

    I want to comment you are good place. game avatar 2.0…

  49. Check this……

    [...] Left you a trackback for your primary visitors to get more information [...]…

  50. Digg…

    While checking out DIGG yesterday I noticed this…

Leave a Reply