copy control on USB
为了防止有人私自用U盘拷贝东西,设置U盘拷贝密码。
以root权限挂载U盘,并设置U盘访问权限为755。
Config
The main idea is to use udev
to control the access of device.
|
|
Use blkid
to get device information, mainly the LABEL
of the USB device.
|
|
|
|
Notes
Becareful with rmUSBDev.sh
, whatever done in this script will not output any message on terminal, not generate any error or warming, and run as root.
Actually, the initial version use rm -rf /media/udisk
to clean the work directory, when I modify it with rm -rf /media/%c
and has error when execute the early RUN
, it become rm -rf /media/
, with the USB plugout, all disks mounted under /media/
are cleaned!!!