Mounting removable drives without root privilege
m (Removable drives moved to Removable drives, mounting without root privilege) |
|||
Line 2: | Line 2: | ||
For information on mounting a usb stick see [[USB storage]]. | For information on mounting a usb stick see [[USB storage]]. | ||
− | To enable users (non-root) to mount/unmount a removable drive, see [[http://www.caia.swin.edu.au/reports/041130A/]]. | + | To enable users (non-root) to mount/unmount a removable drive, see [[http://www.caia.swin.edu.au/reports/041130A/ http://www.caia.swin.edu.au/reports/041130A/]]. |
+ | |||
+ | If you don't want to allow non-root users unfettered access to mount and unmount drives, you might also consider writing a shell script which specifically mounts or dismounts only the drive you're concerned with, and then use [[sudo]] to allow users the privilege of running that script as root. If you do it this way, be CERTAIN that the script is owned by root and chmod 755, so that noone can edit themselves some "extra" things into the script before running it as root. | ||
[[Category:Common Tasks]] [[Category:FreeBSD for Workstations]] | [[Category:Common Tasks]] [[Category:FreeBSD for Workstations]] |
Revision as of 14:52, 28 February 2006
Removable drives can be mounted by root onto any directory. Generally, they should not be automounted at startup because they are not always connected.
For information on mounting a usb stick see USB storage. To enable users (non-root) to mount/unmount a removable drive, see [http://www.caia.swin.edu.au/reports/041130A/].
If you don't want to allow non-root users unfettered access to mount and unmount drives, you might also consider writing a shell script which specifically mounts or dismounts only the drive you're concerned with, and then use sudo to allow users the privilege of running that script as root. If you do it this way, be CERTAIN that the script is owned by root and chmod 755, so that noone can edit themselves some "extra" things into the script before running it as root.