docs/140754: Bad example in handbook 18.5.2
Aldis Berjoza
killasmurf86 at gmail.com
Sat Nov 21 14:40:02 UTC 2009
>Number: 140754
>Category: docs
>Synopsis: Bad example in handbook 18.5.2
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Nov 21 14:40:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Aldis Berjoza
>Release: FreeBSD 8.0-RC3 i386
>Organization:
>Environment:
System: FreeBSD 8.0-RC3 #0: Fri Nov 13 16:14:51 EET 2009
killasmurf86 at killasmurf86.pc:/usr/obj/usr/src/sys/ANTIGENERIC
>Description:
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
>How-To-Repeat:
>Fix:
s/\/mnt\/username/\/home\/username\/mnt/
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-doc
mailing list