Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Nov 2009 16:36:05 +0200
From:      Aldis Berjoza <killasmurf86@gmail.com>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   docs/140754: Bad example in handbook 18.5.2
Message-ID:  <1258814165.3370@killasmurf86.pc>
Resent-Message-ID: <200911211440.nALEe1DV082714@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1258814165.3370>