zEitEr
Super Moderator
Hello,
The box is an OpenVZ container with enabled quotas on /dev/simfs .
We've just found a user who uses 2,3 times of his allowed disk space of 1Gb.
And here is what we've found:
and Directadmin seems to not count files located in /home/someuser/backups owned by root user:
and this is what he has in /home/someuser/backups
And here is what happened (in my understanding):
1. The user having about 70% used space starts creating a backup of his account.
2. As soon as backup is ready Directadmin tries to chown it to someuser, and fails. Thus backup files remains to be owned by root user.
3. As soon as directadmin does not get into account files owned by root in /home/someuser/backups we don't get an alert about the over-usage.
System disk quotas does not work in this case, so the user being unable either to download or delete the files tries to create another backup files, and he faces the same once more time. And in this time he submits a ticket with us.
I'd like this to be fixed. We don't want to allow our users to fill the disk up with their backups owned by root. Neither do the others, I guess.
The box is an OpenVZ container with enabled quotas on /dev/simfs .
We've just found a user who uses 2,3 times of his allowed disk space of 1Gb.
And here is what we've found:
Code:
# du -h /home/someuser/ --max-depth=1
4,0K /home/someuser/.spamassassin
1,7G /home/someuser/backups
32K /home/someuser/Maildir
28K /home/someuser/imap
680M /home/someuser/domains
2,3G /home/someuser/
and Directadmin seems to not count files located in /home/someuser/backups owned by root user:
Code:
# /usr/local/directadmin/dataskq d800
Debug mode. Level 800
root priv set: uid:0 gid:0 euid:0 egid:0
pidfile written
staring queue
dataskq: command: action=quotatally&value=someuser&type=user
Tally User someuser Begin: mask 20
email user /home/someuser/Maildir/.INBOX.spam
email user /home/someuser/Maildir/.INBOX.Trash
email user /home/someuser/Maildir/.Trash
someuser: Purging spam emails older than 30 days for mimc.org.ru
email user /home/someuser/imap/mimc.org.ru/admin/Maildir/.INBOX.spam
email user /home/someuser/imap/mimc.org.ru/admin/Maildir/.INBOX.Trash
email user /home/someuser/imap/mimc.org.ru/admin/Maildir/.Trash
/home/someuser/Maildir is 32768 : realtotal: 32768
/home/someuser/imap is 28672 : realtotal: 61440
/home/someuser/.spamassassin/spam is 0 : total: 0 realtotal: 61440
/home/someuser/.spamassassin/user_spam is 0 : total: 0 realtotal: 61440
/var/spool/virtual/mimc.org.ru is 0 : total: 0 realtotal: 61440
Majordomo usage for /etc/virtual/mimc.org.ru/majordomo : 4096
databases for someuser
Counting found totals for someuser
total bw is 0.000000 from (null) (long long: 0)
bw in meg: 0.000000
meg converted to a string: 0.0000
spaceused: 755986432.000000 (just quota)
spaceused: 760455435.000000 (add dbtotal 4469003)
spaceused: 760459531.000000 (add emltotal 4096) (fyi: realemltotal: 65536)
spaceused: 760459531.000000 (add apachetotal 0)
spaceused: 760459531.000000 (add anonftptotal 0)
spaceused, in meg: 725.230723
meg to temp: 725.2
user.usage quota: 725.2 actual: 725.230723 (should match)
user.uagae email_quota: 65536 actual: 65536 (should match)
ConfigFile::fillFromPost(NULL) : ConnfigFile::filename=(null) : Code last flagged at: getlock(/etc/virtual/mimc.org.ru/autoresponder.conf) : finished
Tally User someuser Complete
done queue
and this is what he has in /home/someuser/backups
Code:
# LANG=C ls -la /home/someuser/backups
total 1684288
drwx------ 2 someuser someuser 4096 Jan 21 14:40 .
drwx--x--- 7 someuser access 4096 Dec 12 14:51 ..
-rw-r----- 1 root root 544344154 Dec 12 14:41 backup-Dec-12-2012-1.tar.gz
-rw-r----- 1 root root 519610032 Jan 21 09:52 backup-Jan-21-2013-1.tar.gz
-rw-r----- 1 root root 519617913 Jan 21 10:35 backup-Jan-21-2013-2.tar.gz
-rw-r--r-- 1 someuser someuser 0 Jan 21 14:40 backup-Jan-21-2013-2.tar.gz.tmp
-rw-r----- 1 someuser someuser 139423133 Oct 13 2010 backup-Oct-13-2010-1.tar.gz
And here is what happened (in my understanding):
1. The user having about 70% used space starts creating a backup of his account.
2. As soon as backup is ready Directadmin tries to chown it to someuser, and fails. Thus backup files remains to be owned by root user.
3. As soon as directadmin does not get into account files owned by root in /home/someuser/backups we don't get an alert about the over-usage.
System disk quotas does not work in this case, so the user being unable either to download or delete the files tries to create another backup files, and he faces the same once more time. And in this time he submits a ticket with us.
I'd like this to be fixed. We don't want to allow our users to fill the disk up with their backups owned by root. Neither do the others, I guess.