Hi,
there are at least two ways to achieve this. The first would be to include the drives into your /etc/fstab file. Read the manpage for fstab, you will find the necessary information there (I've never used this feature and cannot help here).
The second way would be to use udev-rules. I have an udev-rule for my USB-memory-sticks
Code:
# file /etc/udev/rules.d/52-usb-memory.rules
#USB-Stick
SUBSYSTEMS=="usb", KERNEL=="sd?1", ACTION=="add", RUN+="/usr/local/bin/mount-usb.sh"
And I have a little script /usr/local/bin/mount-usb.sh which mounts the devices
Code:
#!/bin/bash
# USB-Stick mounten
sleep 5
device=`dmesg | grep -e sd.: | tail -n 1 | sed -n 's/.*sd.:\s\+\?\(.*\)/\1/i p'`
name=`dmesg | grep -i product: | tail -n 1 | sed -n 's/.*product:\s\+\(.*\)/\1/i p' | sed -n 's/\ /_/g p'`
if [ ! -d /media/$name ]; then
mkdir /media/$name
fi
mount /dev/$device /media/$name
This solution doesn't set any permissions, root is the owner of the devices and the normal user has only read-permission. But one can easily change this with the udev-rule.
Markus