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.