On 08/31/2016 05:03 AM, Ralph Ronnquist wrote: > Ralph Ronnquist wrote on 31/08/16 15:54: >> Ralph Ronnquist wrote on 31/08/16 10:21: >>> >>> >>> fsmithred wrote on 31/08/16 07:54: >>>> ... >>>> I got it to work. Here's the action file and the helper script. The >>>> helper >>>> script is a modified permissions.sh. I added a test for $VDEV_MAJOR and >>>> $VDEV_MINOR to trigger setfacl. Scanner now works on my installation. >>>> ... >>> >>> Great. I'll roll it into the package. >> >> On looking at this, I saw the action file was rather different from >> other action files, and (as I'm slowly picking on this up) I'd like to >> check with you whether the following action file might do the work: >> >> /etc/vdev/actions/scanner.act >> [vdev-action] >> event=add >> path=^bus/usb/*/[001-999] >> OS_SUBSYSTEM=usb >> VAR_PERMISSIONS_OWNER=root >> VAR_PERMISSIONS_GROUP=scanner >> VAR_PERMISSIONS_MODE=0664 >> helper=permissions.sh >> daemonlet=true >> >> Afaict, the acls should follow the file permissions and you shouldn't >> need to set those. >> >> Ralph. > > oops, I seem to have lost the "OS_TYPE=255/255/255" line. Probably important. > > Ralph.
That didn't work, even with the OS_TYPE=255/255/255. The file permissions get set, but not the acl. I played with some variations, and the following works, but only if I add the lines for setfacl to permissions.sh. (i.e. test for major and minor number then run setfacl) /etc/vdev/actions/scanner.act [vdev-action] event=add path=^bus/usb/*/[001-999] OS_SUBSYSTEM=usb OS_TYPE=255/255/255 VAR_PERMISSIONS_OWNER=root VAR_PERMISSIONS_GROUP=scanner VAR_PERMISSIONS_MODE=0664 helper=permissions.sh if_exists=run One other problem with all the ways I've tried is that if I unplug the scanner and plug it in again, the acl does not get set. A reboot is required for that. -fsr _______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng