Suppose User A and User B have disk quotas of 1 GB. Also suppose User B creates a 900 MB file with permission 0666.This allows User A to access that file temporarily (for some project, etc.).Notice this allows User A to write to the file as well.If User A creates a hard link to that file, and User B then deletes the file, has User A essentially exploited the quota system by stealing 900 MB of storage from User B?Assume User B never reports this to the admin, and the admin never finds out.Also assume User B never suspects a thing about User A. In other words, assume User B will not look at User A's directory and corresponding files.If similar question has been asked/answered before, I apologize for not being able to find them.
Hard Linking Other Users' Files
permissions;hard link
This is one of the ugly corner cases of the Unix permission model. Granting write access to a file permits hard-linking it. If user A has write permission to the directory containing the file, they can move it to a directory where user B has no access. User B then can't access the file anymore, but it still counts against user B for quota purposes.Some older Unix systems had a worse hole: a user could call chown to grant one of their file to another user; if they'd made the file world-writable before, they could keep using that file but the file would count against the other user's quota. This is one reason modern systems reserve chown to root.There is no purely technical solution. It's up to user B to notice that their disk usage (du ~) doesn't match their quota usage and complain to the system administartor, who'll investigate and castigate user A.