New user using over 100 meg of space and nothing has been added yet

If you create a new user, and find that he's using several hundred meg after the tally has been run, but you know that nothing has been uploaded yet, there are probably other files on your sytem causing this error.

When a tar.gz file is extracted as root, the file ownership of it's contents will generally stay the same as they were on the system that compressed the tar.gz file.  This means that the user id number of the files will be extracted along with the files.  When you create your new user, his new user id might match the user id of the files that were extracted, so the system quotas will assume that the new user owns these other files thus adding large amounts of disk usage to the new user.

To resolve the problem, you'll have to find these other files and chown them to another user (or root) so that the new user doesn't absorb the "cost" of their space.  To that, you can use the "find" program:

[root@server]# id username
uid=510(username) gid=510(username) groups=510(username)
[root@server]# find / -uid 510 | less

This code will tell you the userid of the new user, and then let you track down where the files are on the system.  (press space to scroll)

Once you find the files that shouldn't belong to the new user, then cd to that directory and "chown root *" the files (depending on which files they are) so that they no longer belong to the user.

You should be able to type

quota -v username

to see the current disk usage for that user.  If it isn't correct with the new settings, you'll need to update the system quotas:
RedHat

/sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;

FreeBSD:

/usr/sbin/quotaoff -a; /sbin/quotacheck -aug; /usr/sbin/quotaon -a;

Once the quota system catches that, you can run the tally to update his stats.

echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queue


Was this article helpful?

mood_bad Dislike 1
mood Like 0
visibility Views: 9948