Bob is the sysadmin.
Alice is a user, and boy is she a mess.
Bob has set up a shared folder, say
/srv/share, with permissions of 775 and ownership belonging to
Alice is not a part of the
mv's one of Alice's files named "prescriptions.pdf" to the the
/srv/share directory. It maintains the ownership of
alice:alice. Bob mistakenly assumes the file is safe, as Alice cannot delete or rename the file due to directory permissions.
One day Alice forgets to take her medication, and has an episode. She can't delete that file, so she executes
echo "" > /srv/share/prescriptions.pdf
Now none of her coworkers know what to do.
Bob could have made the share directory without global
x permissions, but several daemons also require read access to files in that directory, and some of those daemons Bob would rather keep from having
w permissions, so he only has users in the
Surely Bob would not have to religiously change file ownership every time a file is moved to that directory. What else could Bob have done to prevent certain users altering files in that directory?