non-superuser chown(2)s considered harmful

John F Carr jfc at athena.mit.edu
Wed Dec 12 16:21:14 AEST 1990


In article <1990Dec10.231812.23634 at gjetor.geac.COM>
	adeboer at gjetor.geac.COM (Anthony DeBoer) writes:

>Just for my $0.02 worth, if quotas are in effect, why not have a nightly
>daemon that goes through each user's directory and blows away anything he/she
>doesn't own?  This should take care of out-chowning files to bypass
>allocation.

It is much more polite to chown the files to the owner of the directory,
going up as many levels as needed to find an acceptable owner.  I wrote such
a program to run on our file servers (we run BSD, which doesn't allow users
to run chown, but our NFS servers map unauthenticated users to user "nobody"
on the server so files owned by "nobody" were accumulating in
world-writeable directories).

--
    John Carr (jfc at athena.mit.edu)



More information about the Comp.unix.internals mailing list