daniel daniel@interq.or.jp writes:
I have a user who can not upload any files to his home dir using ftp and the error message he gets is "disk quota exceeded".
I checked his users quota from the filer and noticed that he is indeed over the limit of his quota.
Then you may need to increase his users quota as the filer counts all files owned by each user in each of the quota type, and hence a simple df -s will not work.
From my own quotas file:
#Quota Target type disk files rb user@/vol/users/home 8G 300K
Any files I own on or below /vol/users/home will be counted in the quota. Even if they exists outside my designated $HOME.
quota -v <user> on Solaris gives you the this output:
kavringen(root) local 501# quota -v rb Disk quotas for rb (uid 392): Filesystem usage quota limit timeleft files quota limit timeleft /home/nfs/users 2522412 8388608 8388608 50844 307200 307200
I would suspect that other OS' has similar tools.
>.rune
Acutally I already tried that quota -v user and found that he has already exceeded his limit. Also I confirmed this on the filer as well using quota report directory.
The reason why I do not simply increase his quota, is because we do not allow users to create files beside his/her home dir. I need to find out why this is happening and fix it.
Thanks for your comment though.
Daniel Jung
System Administrator GMO inc
On 16 Nov 2001, Rune Bakken wrote:
daniel daniel@interq.or.jp writes:
I have a user who can not upload any files to his home dir using ftp and the error message he gets is "disk quota exceeded".
I checked his users quota from the filer and noticed that he is indeed over the limit of his quota.
Then you may need to increase his users quota as the filer counts all files owned by each user in each of the quota type, and hence a simple df -s will not work.
From my own quotas file:
#Quota Target type disk files rb user@/vol/users/home 8G 300K
Any files I own on or below /vol/users/home will be counted in the quota. Even if they exists outside my designated $HOME.
quota -v <user> on Solaris gives you the this output:
kavringen(root) local 501# quota -v rb Disk quotas for rb (uid 392): Filesystem usage quota limit timeleft files quota limit timeleft /home/nfs/users 2522412 8388608 8388608 50844 307200 307200
I would suspect that other OS' has similar tools.
>>.rune
-- Rune Bakken "I feel sorry for people who don't drink. System Administrator When they wake up in the morning, that's as Nextra, good as they're going to feel all day."
- Telenor Company - Frank Sinatra
Acutally I already tried that quota -v user and found that he has already exceeded his limit. Also I confirmed this on the filer as well using quota report directory.
The reason why I do not simply increase his quota, is because we do not allow users to create files beside his/her home dir. I need to find out why this is happening and fix it.
Thanks for your comment though.
Daniel Jung
I can think of several common scenarios where a user ends up owning files outside their home directory.
If superuser uses tar to "untar" an archive file, then tar preserves the original owner of the files. So let's suppose you download a big tar archive from some web site and the files in the archive are all owned by uid N. And then by coincidence you also have a user with uid N. When superuser un-tars the archive, this creates a whole lot of files owned by N.
Similar things can happen with other file archivers such as cpio, dump/restore, etc.
Also, if superuser uses tar or cpio or rsync or "cp -r -p" to copy files from one user's directory to another, the original file owner is preserved.
Perhaps superuser got careless with "chown -R" and inadvertently changed ownership of a bunch of files to the user. When you chown a file from one user to another, the disk space totals for both users are adjusted accordingly.
And finally, a user can open up any directory he owns with chmod 777. So if I open up one of my directories like this, then anyone else can create files in that directory, but they own them, not me. So their quota gets charged, not mine.
I suggest going to the top of the volume and running:
find . -user username -print
which will find all files owned by the user. Then you will be able to figure out what happened.
Steve Losen scl@virginia.edu phone: 434-924-0640
University of Virginia ITC Unix Support
Steve Losen writes ---
I can think of several common scenarios where a user ends up owning files outside their home directory.
[cut superuser scenarios] [cut mode 777 dir scenarios]
Another scenario that I've seen. If user B makes a hard link to a file owned by user A, in user B's directory, and then user A deletes his link to the file, then the file will continue to exist in user B's directory, owned by user A.
This happened a lot in my undergraduate college days, when we had really small quotas, and wanted to have lots of programs. One student would compile the program, and then lots of others would link to it, thereby avoiding the quota. Hard links were used instead of soft links, (or just setting the path) because when a user left the school, the admin's didn't go hunting the files down across the entire filesystem, they just removed the homedirs. There were files around that were owned by students that had left over 5 years earlier.
William W. Arnold writes:
Steve Losen writes ---
I can think of several common scenarios where a user ends up owning files outside their home directory.
[cut superuser scenarios] [cut mode 777 dir scenarios]
Another scenario that I've seen. If user B makes a hard link to a file owned by user A, in user B's directory, and then user A deletes his link to the file, then the file will continue to exist in user B's directory, owned by user A.
This happened a lot in my undergraduate college days, when we had really small quotas, and wanted to have lots of programs. One student would compile the program, and then lots of others would link to it, thereby avoiding the quota. Hard links were used instead of soft links, (or just setting the path) because when a user left the school, the admin's didn't go hunting the files down across the entire filesystem, they just removed the homedirs. There were files around that were owned by students that had left over 5 years earlier.
Sysadmins falling down on the job there, I think!
We do regular scans of the relevant directory trees for "wrong owner" files, and inform both parties of anomalies. We also have a policy that either user can ask for the misplaced files or directories to be removed in the case when they have insufficient access to do so themselves. Also "such requests will automatically be considered to have been made by any user whose account has been cancelled."
I have a Perl script "ownerchange" which identifies places in a directory tree where ownership changes between a directory and the thing contained in it. (Ideally applied to a NetApp snapshot to guarantee non-mutability during scanning and non-updating of atimes.) Let me know if it you think it might be useful.
Chris Thompson University of Cambridge Computing Service, Email: cet1@ucs.cam.ac.uk New Museums Site, Cambridge CB2 3QH, Phone: +44 1223 334715 United Kingdom.