Bug 140754

Summary: [handbook] Bad example in handbook 18.5.2
Product: Documentation Reporter: Aldis Berjoza <killasmurf86>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Aldis Berjoza 2009-11-21 14:40:01 UTC

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/usb-disks.html#AEN24782

Handbook:
The final step is to create a directory where the file system is to be mounted. This directory needs to be owned by the user that is to mount the file system. One way to do that is for root to create a subdirectory owned by that user as /mnt/username (replace username by the login name of the actual user and usergroup by the user's primary group):
# mkdir /mnt/username
# chown username:usergroup /mnt/username

This isn't good. Because in most cases /mnt is just directory on root partition, and noone will probably want to create new slice/partition for /mnt if it's not used.

I think a much better example would be to recommed create ~/mnt instead:
# mkdir /home/username/mnt
# chown username:usergroup /home/username/mnt

Because usually /home is on separate slice partition.

Why original example is bad?
Because if for some reason destination is not mounted (/mnt/username), user still can copy files there. This way user can make root ful (willingly or unwillingly)

Since /home is usually on separate slice/partition user can do whatever he wants.

I hope you understand what I'm trying to say

Fix: 

s/\/mnt\/username/\/home\/username\/mnt/
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2009-12-14 13:46:44 UTC
State Changed
From-To: open->closed

/mnt is a traditional place for mounts; I think it's fine as an example. 
And the user cannot really fill / because of the minfree feature of UFS.