Hello guys !
PROBLEM.
Plugging a usb pen drive into PC, I want:
1 - the generic user Imaging has absolute control of it
2 – Imaging and only Imaging user can read the device
SOLUTION PROPOSAL.
1 – Add the user Imaging (following the adduser instructions in the FreeBSD Handbook)
2 – configure /etc/devfs.conf in this way:
own da* Imaging:Imaging
perm da* 400
3 – configure /etc/defaults/devfs.rules in this way:
[devfsrules_imaging_usb=8]
add path da* user Imaging
add path da* mode 400
4 – I’m not interesting to enable this behavior at boot, so I don’t update /etc/rc.conf with the rule: devfs_system_rulesets="devfsrules_usb"
QUESTIONS.
So doing, every time I plug in a usb drive, I would want to see:
Imaging@maia:/ % ls -lag /dev/da4
cr-------- 1 Imaging (no-group here) 0xe9 .......
Please, can you tell me if is it correct ?
Where am I wrong ?
Thanks in advance.
Note - this post follows the previous one: [FONT=Arial]root [/FONT][FONT=Arial]and non-root users: what the differences.[/FONT]
PROBLEM.
Plugging a usb pen drive into PC, I want:
1 - the generic user Imaging has absolute control of it
2 – Imaging and only Imaging user can read the device
SOLUTION PROPOSAL.
1 – Add the user Imaging (following the adduser instructions in the FreeBSD Handbook)
2 – configure /etc/devfs.conf in this way:
own da* Imaging:Imaging
perm da* 400
3 – configure /etc/defaults/devfs.rules in this way:
[devfsrules_imaging_usb=8]
add path da* user Imaging
add path da* mode 400
4 – I’m not interesting to enable this behavior at boot, so I don’t update /etc/rc.conf with the rule: devfs_system_rulesets="devfsrules_usb"
QUESTIONS.
So doing, every time I plug in a usb drive, I would want to see:
Imaging@maia:/ % ls -lag /dev/da4
cr-------- 1 Imaging (no-group here) 0xe9 .......
Please, can you tell me if is it correct ?
Where am I wrong ?
Thanks in advance.
Note - this post follows the previous one: [FONT=Arial]root [/FONT][FONT=Arial]and non-root users: what the differences.[/FONT]