Tips for fixing common problems….-New user using over 100 meg of space and nothing has been added yet
If you have a user, let’s call them
and you find that they are using more system quotas then than you think they should be, there could be other files on your system causing this error.
When a tar.gz file is extracting as root, the file ownership of it’s contents will then generally stay the same as they were on the system that compresses the tar.gz file.
This means that the user id number of the files will be extracting along with the files. When you create your new user, his new user id may match the user id of the files that were extracting, 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 this problem, you will have to find these other files and chow them to another user (or root) after that the new user does not absorb the “cost” of their space.
So 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 that userid of the new user, and then let you track down where the files are on the system. (press space to scroll).
Replace the 510 sample with the actual UID number returns by the system.
Once you find the files that should not belong to the new user, then cd to that directory and “chown root *” these 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 is not correct with the new settings, you will need to update the system quotas:
/sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;
/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
Because the above find command may be slow, you can either do a quick comparison with the contents of the User’s home folder, eg:
du username | sort -n
du -sh username