Description
Building FTP server based on ProFTPD and support by MySQL authentication.
User separate by 2 groups, user full access and user readonly.
Download
ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.0a.tar.gz
http://dev.mysql.com/downloads/
Configure [Configure ProFTPD]
# ./configure --with-modules=mod_sql:mod_sql_mysql:mod_quotatab:mod_quotatab_sql \
--with-includes=/usr/include/mysql/ --with-libraries=/usr/lib/mysql/
# make
# make install
[Login To MySQL]
# mysql -u root -p
mysql> create database ftp;
mysql> use mysql;
mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO 'proftp'@'localhost'
IDENTIFIED BY 'kunam';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO 'proftp'@'localhost.localdomain'
IDENTIFIED BY 'kunam';
mysql> FLUSH PRIVILEGES;
mysql> USE ftp;
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='ProFTP group table';
CREATE TABLE ftpquotalimits (
name varchar(30) default NULL,
quota_type enum('user','group','class','all') NOT NULL default 'user',
per_session enum('false','true') NOT NULL default 'false',
limit_type enum('soft','hard') NOT NULL default 'soft',
bytes_in_avail int(10) unsigned NOT NULL default '0',
bytes_out_avail int(10) unsigned NOT NULL default '0',
bytes_xfer_avail int(10) unsigned NOT NULL default '0',
files_in_avail int(10) unsigned NOT NULL default '0',
files_out_avail int(10) unsigned NOT NULL default '0',
files_xfer_avail int(10) unsigned NOT NULL default '0'
) TYPE=MyISAM;
CREATE TABLE ftpquotatallies (
name varchar(30) NOT NULL default '',
quota_type enum('user','group','class','all') NOT NULL default 'user',
bytes_in_used int(10) unsigned NOT NULL default '0',
bytes_out_used int(10) unsigned NOT NULL default '0',
bytes_xfer_used int(10) unsigned NOT NULL default '0',
files_in_used int(10) unsigned NOT NULL default '0',
files_out_used int(10) unsigned NOT NULL default '0',
files_xfer_used int(10) unsigned NOT NULL default '0'
) TYPE=MyISAM;
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 '/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',
PRIMARY KEY (id),
UNIQUE KEY userid (userid)
) TYPE=MyISAM COMMENT='ProFTP user table';
##### Create Group Full Access #####
INSERT INTO `ftpgroup` (`groupname`, `gid`, `members`) VALUES ('ftpgroup', 2001,
'ftpuser');
##### Create Group Read Only #####
INSERT INTO `ftpgroup` (`groupname`, `gid`, `members`) VALUES ('readftpgroup',
2002, 'readftpuser');
##### Create Test User Full Access #####
INSERT INTO `ftpquotalimits` (`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`) VALUES ('demouser', 'user', 'true', 'hard', 157286400, 0,
0, 0, 0, 0);
INSERT INTO `ftpuser` (`id`, `userid`, `passwd`, `uid`, `gid`, `homedir`, `shell`,
`count`, `accessed`, `modified`) VALUES (1, 'demouser', 'secret', 2001, 2001,
'/data/ftp/demouser', '/sbin/nologin', 0, '', '');
##### Create Test User Readonly #####
INSERT INTO `ftpquotalimits` (`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`) VALUES ('userdemo', 'user', 'true', 'hard', 157286400, 0,
0, 0, 0, 0);
INSERT INTO `ftpuser` (`id`, `userid`, `passwd`, `uid`, `gid`, `homedir`, `shell`,
`count`, `accessed`, `modified`) VALUES (2, 'userdemo', 'wedhus', 2002, 2002,
'/data/ftp/demouser', '/sbin/nologin', 0, '', '');
mysql> quit
##### Linux Shell ###############
##### Add Group Full Access #####
groupadd -g 2001 ftpgroup
##### Add User Full Access #####
useradd -u 2001 -s /bin/false -d /bin/null -c "proftpd user" -g ftpgroup
ftpuser
##### Add Group Read Only #####
groupadd -g 2002 readftpgroup
Exec Path:
/usr/local/sbin/proftpd
Config File:
/usr/local/etc/proftpd.conf
Data:
/data/ftp/
# Basic ProFTPD Configuration
ServerName "FTP Server"
ServerType standalone
DefaultServer on
ServerAdmin admin@localhost.com
# Port 21 is the standard
FTP port.
Port 21
# Umask 022 is a good standard
umask to prevent new dirs and files
# from being group and world writable.
Umask 022
MaxInstances 30
# Set the user and group under
which the server will run.
User ftpuser
Group ftpgroup
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~
# Normally, we want files
to be overwriteable.
AllowOverwrite on
# Bar use of SITE CHMOD by default
DenyAll
#####################
TransferLog /var/log/proftpd.xferlog
LogFormat default "%h %l %u %t \"%r\" %s %b"
LogFormat auth "%v [%P] %h %t \"%r\" %s"
LogFormat write "%h %l %u %t \"%r\" %s %b"
# Log file/dir access
ExtendedLog /var/log/proftpd.access_log WRITE,READ write
# Record all logins
ExtendedLog /var/log/proftpd.auth_log AUTH auth
# Paranoia logging level....
ExtendedLog /var/log/proftpd.paranoid_log ALL default
#####################
# 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 kunam
# 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 f
tpquotatallies 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
######### end of proftpd.conf #########
[Start proftpd]
/usr/local/sbin/proftpd
99 comments:
фото школьниц http://free-3x.com/ фото секс с молодыми free-3x.com/ порно фото малолеток онлайн [url=http://free-3x.com/]free-3x.com[/url]
konang.blogspot.com is very informative. The article is very professionally written. I enjoy reading konang.blogspot.com every day.
cash loan
cash advance
[color=#336699]
Приветик! И кстати.. есть cупер предложение по[url=http://www.pi7.ru] видео[/url] порталу Думаю вам понравится
[url=http://www.pi7.ru]кончают с вибратором домашнее[/url]
aнекдот для разнообразия :)
Студнетка делится впечатлением с подругой о летней практике:
- А ночевали мы на сеновале. Однажды началась гроза, и крыша рухнула. . .
- И тебя не придаивло?
- Нет, все Лёше на спину пуало
Я 8 часов блуждала по сети, пока не вышлеа на ваш форум! Думаю, я здесь остнаусь надолгро!
прошу прощения за опечатки.... очень маленьквя клавиатура у PDA!
[/color]
We do over houses In Maryland,US.
Custom / Exterior remodelings,
suitable prices,license,
references,photos,free estimates,
also pay off houses to restorate:
http://www.renewhouse4u.com.
Mobile:410-978-7981.
Thanks.
We redecorate houses In Maryland,US.
Interior / Exterior remodelings,
suitable prices,license,
references,photos,free estimates,
also buy houses to repair:
http://www.renewhouse4u.com.
Mobile:410-978-7981.
Thanks.
Greatings, Everything dynamic and very positively!
Хм… даже такое бывает.
ativan lorazepam where to buy ativan online - ativan to get high
order diazepam buy diazepam 5mg online - diazepam 10mg buy cheap
valium no prescription online valium 5mg street value - xanax versus valium for anxiety
alprazolam 0.5mg buy 1 mg xanax online - xanax dosage .25 mg
alprazolam buy xanax online overnight - xanax side effects nausea
valium diazepam full price for diazepam 10mg - diazepam 5 mg for sleep
alprazolam buy xanax brand online no prescription - xanax side effects percentage
lorazepam drug apo-lorazepam 1mg lorazepam - ativan overdose dog
buy xanax online cheap no prescription xanax side effects shaking - xanax withdrawal loss of appetite
cheap soma online soma drug test how long does it stay in your system - naproxeno carisoprodol dosage
order valium online no prescription is valium stronger than diazepam - valium anti anxiety
soma cheap best buy soma - carisoprodol long does stay system
buy valium online generic valium no prescription - valium online topix
buy soma there generic soma - carisoprodol 120
valium medication buy valium online no prescription cheap - what generic valium looks like
buy generic soma ketamine carisoprodol - how to buy somatropin in canada
order valium online valium employment drug test - buy valium online fast delivery
buy ambien online ambien side effects ear ringing - generic ambien 12.5 cr
Blogger: Linux Microsoft Windows FreeBSD SUN Solaris Oracle System Admin PHP Indonesia Blog - Post a Comment cheap ventolin online - generic ventolin online http://www.ventolinforsaleonline.com/#generic-ventolin-online
Blogger: Linux Microsoft Windows FreeBSD SUN Solaris Oracle System Admin PHP Indonesia Blog - Post a Comment buy prednisone - buy prednisone online http://www.ourdailybreadmarket.net/#buy-prednisone-online
Blogger: Linux Microsoft Windows FreeBSD SUN Solaris Oracle System Admin PHP Indonesia Blog - Post a Comment cheap soma online no prescription - generic soma for sale http://www.emprendiendoideas.com/#generic-soma-for-sale
Blogger: Linux Microsoft Windows FreeBSD SUN Solaris Oracle System Admin PHP Indonesia Blog - Post a Comment reductil price - buy generic sibutramine http://www.meridiaordernow.com/#buy-generic-sibutramine
Blogger: Linux Microsoft Windows FreeBSD SUN Solaris Oracle System Admin PHP Indonesia Blog - Post a Comment ativan overnight - lorazepam cost http://www.ativanonlineoffer.com/#lorazepam-cost
alkadrawl zetia no prescription - zetia online http://www.pharmaonlinesales.com/
Blogger: Linux Microsoft Windows FreeBSD SUN Solaris Oracle System Admin PHP Indonesia Blog - Post a Comment ativan sale - buy cheap ativan online http://www.ativanonlineoffer.com/#buy-cheap-ativan-online
alkadrawl tricor without prescription - buy tricor http://www.pharmaonlinesales.com/
Hi, MoxoredapeTox propecia for sale - order propecia online http://www.bigdocpoker.com/#cheap-finasteride-5mg
Hi, MoxoredapeTox order propecia online no prescription - order propecia http://www.bigdocpoker.com/#buy-propecia
Hi, MoxoredapeTox zithromax for sale no prescription - azithromycin 500mg http://www.zithromaxonlineprice.com/#azithromycin-500mg
Summit County Drug Unit prednisone acne - prednisone prednisolone http://www.prednisone4sale.com/#prednisone-prednisolone
Administering Medication In Ohio prednisone 5mg - prednisone acne http://www.prednisone4sale.com/#prednisone-acne
Hello, generic effexor online - buy venlafaxine hcl http://www.effexorcostonline.com/#buy-venlafaxine-hcl
New Discovery On Medicine buy acomplia online - buy acomplia http://www.buydiscountedisotretinoin.net/#buy-acomplia
Hello, propecia price - cheap propecia http://www.bigdocpoker.com/#buy-propecia
Hello, lipitor for sale - lipitor online http://www.costoflipitoronline.net/#lipitor-online
advitleva buy finasteride - propecia online http://www.bestpricefinasteride.com/
Kerr Drug And Concord Nc generic zithromax no prescription - order azithromycin online no prescription http://www.boggietownmovie.com/, [url=http://www.boggietownmovie.com/]buy azithromycin without prescription [/url]
Doctors Willing Prescribe Pain Medication buy lexapro online no prescription - cheap escitalopram http://www.costoflexaproonline.net/#cheap-escitalopram , [url=http://www.costoflexaproonline.net/#cheap-lexapro ]cheap lexapro [/url]
tfv clopidogrel without prescription - cheap clopidogrel http://www.plavixbuynow.net/#cheap-plavix, [url=http://www.plavixbuynow.net/#cheap-plavix]cheap plavix no prescription [/url]
tmd [url=http://www.lamisilonlinerx.net/#buy-terbinafine-online-no-prescription ]buy terbinafine tablets online [/url] - buy generic terbinafine - terbinafine 250 mg without prescription http://www.lamisilonlinerx.net/#terbinafine-250mg ,
sob buy gabapentin online - buy gabapentin http://www.neurontinonlinesales.net/#buy-gabapentin , [url=http://www.neurontinonlinesales.net/#gabapentin-online ]gabapentin online [/url]
sob buy neurontin online no prescription - neurontin cost http://www.neurontinonlinesales.net/#neurontin-cost , [url=http://www.neurontinonlinesales.net/#order-gabapentin-online ]order gabapentin online [/url]
Hello, purchase ambien - buy generic ambien http://www.ambienonlineprices.com/#buy-generic-ambien , [url=http://www.ambienonlineprices.com/#generic-ambien-cost ]generic ambien cost [/url]
buy tramadol online tramadol online ireland - tramadol 50 mg kaufen
4 Cymbalta 60mg - buy cymbalta online http://www.cymbaltaduloxetineorder.net/#buy-duloxetine, [url=http://www.cymbaltaduloxetineorder.net/#order-cymbalta]Cymbalta Generic[/url]
6, cheap adipex 37.5 mg - cheap adipex http://www.costofadipex375.com/#cheap-adipex-online, [url=http://www.costofadipex375.com/#cheap-adipex-37.5 mg]cheap adipex[/url]
6, order provigil online - provigil medication http://www.provigilonlinediscount.com/#provigil-no-rx, [url=http://www.provigilonlinediscount.com/#provigil-online-order]provigil without prescription[/url]
I can't start my installment but paying interest on the bank payday loans interest rates are not the one possible disadvantage in owning a charge card, though.
Hi, purchase accutane online - isotretinoin online pharmacy http://www.twincitiescheap.com/, [url=http://www.twincitiescheap.com/]isotretinoin pills [/url]
Hi, clonazepam online no prescription - generic klonopin http://www.bestpriceklonopin.com/, [url=http://www.bestpriceklonopin.com/]buy clonazepam no prescription [/url]
Li, order prozac - buy fluoxetine online no prescription http://www.prozacorder365.net/, [url=http://www.prozacorder365.net/]fluoxetine cost[/url]
Hi, provigil medication - provigil no prescription http://setbaclinks.com/, [url=http://setbaclinks.com/]provigil online[/url]
4, Accutane Online - buy roaccutane http://www.benefitsofisotretinoin.net/, [url=http://www.benefitsofisotretinoin.net/]Generic Accutane Cost[/url]
4, [url=http://www.maxaltrxonline.net/]maxalt without prescription [/url] - buy maxalt - buy maxalt online http://www.maxaltrxonline.net/.
2, [url=http://www.sheddesignhub.com/]Sumatriptan Price [/url] - Imitrex Cost - generic imitrex cost http://www.sheddesignhub.com/ .
2, [url=http://www.rcenter.net/]Sumatriptan Price[/url] - Imitrex Pills - sumatriptan online no prescription http://www.rcenter.net/ .
Тhе ωrite-up offers verified
hеlpful to me. Ιt’s very helρful and you're naturally extremely well-informed in this area. You get opened up our face to be able to numerous views on this specific topic together with interesting and solid content material.
My site : viagra
12, Order Fluoxetine - Prozac Cost - order prozac online http://www.encuentrocubano.com/ .
The reρort featureѕ confirmed beneficial to mysеlf.
Ιt’s veгy infoгmativе and you are obviоuslу extremely еԁucated in thіs field.
You have got poppеd οuг eyes to be ablе
to numerοuѕ thoughts about this mattеr with intгіguing and strong сontent materiаl.
My homepage - Xanax
viagra ed generic viagra in canadacheap viagra online india
cialis cialis in canadacialis 27 90
buy viagra viagra 8000mgcheap viagra 100mg online
buy levitra levitra lastslevitra cialis viagra comparaison
tramadol drug class tramadol que estramadol with alcohol
levitra half life levitra 3 freelevitra high blood pressure
cialis xanax interaction cialis xalatancialis tolerance
tramadol for cats tramadol 100mg hightramadol tylenol
cialis generico mexico cialis urinationcialis online
pharmacy uga pharmacy 835 formatpharmacy 24 hours brooklyn
levitra questions levitra usage instructionslevitra yahoo
tadalafil vs viagra best place buy tadalafil onlinetadalafil suspension
tadalafil generic 20mg tadalafil spraytadalafil bodybuilding
tramadol 25mg tablets ???????? ?????tramadol 2012
provigil 400 provigil sleep apneaprovigil samples
cialis 80 mg dosage cialis 2.5cialis side effects
cialis prescription cialis 05668cialis news
generic cialis cialis in womencialis without ed
generic cialis online cialis imagescialis 0 005
buy levitra levitra ingredientslevitra jokes
tramadol tramadol headachetramadol breastfeeding
http://www.cialisonlines.org/ cialis bph approvalcialis price walgreens
online cialis cialis with dapoxetinecialis urinary frequency
http://www.cialisonlines.org/ cialis medicinecialis xanax interaction
kamagra plus tadalafil 20mg tadalafil and bphcheapest tadalafil online uk
tramadol tramadol recreational dosetramadol zolpidem interaction
pharmacy in canada pharmacy assistant jobspharmacy bar dc
online tramadol tramadol 300 ertramadol generic for ultram
cialis cialis 72 saatcialis for daily use
cialis information cialis 100cialis normal dosage
viagra online viagra overdoseviagra online in usa
phentermine without a prescription phentermine 647phentermine success stories
online viagra viagra best resultscheap viagra online uk
http://www.cialisrx.info/ cialis za zenecialis xl
canada pharmacy pharmacy walgreenspharmacy 2 home review
buy viagra buy viagra online from canadaviagra canada sales
cialis last longer cialis que escialis nitroglycerin
cheap viagra to canada viagra online mastercardviagra online united states
zolpidem versus ambien zolpidem kidney problemszolpidem during pregnancy
pharmacy online pharmacy residency matchpharmacy gifts
viagra online brand viagra online cheap no prescriptioncheap viagra china
zolpidem cost zolpidem 3 mgzolpidem zolfresh
cialis leg pain cialis 36 hour reviewscialis 0800
cialis kidney pain cialis couponcialis instructions
cheap viagra levitra viagra online xlpharmacycheap viagra works
tramadol efectos secundarios tramadol onlinetramadol 625
provigil schedule 4 provigil jawprovigil 100 mg tablet
levitra reviews webmd levitra 40 mg dosagelevitra 5mg vs 10mg
buy levitra levitra online usalevitra online pharmacy
viagra buy viagra cialis online canadaviagra 72 hours
buy cialis uk cialis price walgreenscialis headache
http://www.levitraonlines.net/ levitra 10mg reviewslevitra lowest price
pharmacy pharmacy burgerpharmacy one source
buy tadalafil tadalafil analoguestadalafil and dapoxetine
zolpidem ambien zolpidem maximum dosezolpidem tartrate 93 73
levitra levitra length of actionlevitra 10mg vs 20mg
buy cialis uk cialis bathtub commercialcialis stories
levitra levitra 100mglevitra mg
cialis commercial bathtub cialis back paincialis non prescription
viagra 99.00 cheap viagra quick deliverycheap viagra kamagra
levitra (vardenafil) 5mg levitra men's healthlevitra tips
pharmacy 8 cent stamp pharmacy letterpharmacy 2000
buy tadalafil online tadalafil order onlinewhat is tadalafil oral jelly
http://www.biocrim.com/ buy viagra canada pharmacyviagra ingredients
Post a Comment