Jump to content

Настройка квот для анонимного доступа к виртуальному хосту proftpd


Recommended Posts

Доброго времени суток!

ниже приведена секция описывающая работу виртуального хоста из файла virtuals.conf


<VirtualHost ***>

ServerAdmin ***

ServerName "***"

TransferLog /var/log/proftpd/xfer/ftp.server.com

TransferRate RETR 1

MaxLoginAttempts 3

RequireValidShell no

DefaultRoot ~

AllowOverwrite yes

#setting where from to take parametrs for quota

QuotaLimitTable file:/home/ftp/ftpquota.limittab

QuotaTallyTable file:/home/ftp/ftpquota.tallytab

<Anonymous ~/tmp>

User anonymous_u

Group anonymous

#UserAlias anonymous_u ftp

# Cosmetic changes, all files belongs to ftp user

DirFakeUser on anonymous_u

DirFakeGroup on anonymous_u

# We want 'welcome.msg' displayed at login, and '.message' displayed

# in each newly chdired directory.

#DisplayLogin welcome.msg

#DisplayChdir .message

# Limit WRITE

<Directory />

<Limit WRITE>




# Allow STORE

<Directory />

<Limit STORE>





Модуль mod_quotatab.c в proftpd.conf активирован


<IfModule mod_quotatab.c>

QuotaEngine on


Сами таблицы


root@:/home/ftp# ftpquota --show-records --type=limit


Name: anonymous_u

Quota Type: User

Per Session: False

Limit Type: Hard

Uploaded bytes: 15728640.00

Downloaded bytes: unlimited

Transferred bytes: unlimited

Uploaded files: 4294967295

Downloaded files: 4294967295

Transferred files: unlimited


root@xxx:/home/ftp# ftpquota --show-records --type=tally


Name: anonymous_u

Quota Type: User

Uploaded bytes: 10485760.00

Downloaded bytes: 10485760.00

Transferred bytes: 0.00

Uploaded files: 4294967295

Downloaded files: 0

Transferred files: 0

А вот листинг сессии на сервере


xxx@students:~$ ftp xxx

Connected to xxx.

220 ProFTPD 1.3.3a Server (Vitia) [::ffff:xxx]

Name (xxx:xxx): anonymous_u

331 Anonymous login ok, send your complete email address as your password


230 Anonymous access granted, restrictions apply

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> quote site quota

202 No quotas in effect


И вот это то и не понятно - почему квоты не установились???

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...