Jump to content
Sign in to follow this  
frostflame

Настройка квот для анонимного доступа к виртуальному хосту 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>

AllowAll

</Limit>

</Directory>

# Allow STORE

<Directory />

<Limit STORE>

AllowAll

</Limit>

</Directory>

</Anonymous>

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

Цитата:

<IfModule mod_quotatab.c>

QuotaEngine on

</IfModule>

Сами таблицы

Цитата:

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@students:/home/ftp#

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

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

ftp>

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

Share this post


Link to post
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.

Guest
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.

Loading...
Sign in to follow this  

×
×
  • Create New...