On Thu, 9 Aug 2018, Iznogoud wrote:

>> While I'm on this topic, because of how they are mounted, these drives 
>> are only accessible to me -- to my user account -- and not to other 
>> users or processes.  I would like to be able to make them available to, 
>> say, the Apache web server.  Does anyone know how to do that?
>
> What I would do is create a group (/etc/groups) that is responsible for 
> keeping this data around and make both you and the webserver user 
> ("apache" I think) members of the group. Then, give read-write and 
> execute permissions to the drives to this group. Something like that.

Thanks for the tips (some not recapped here).  The webserver is user name 
is "www-data" (I guess that's the Apache default now).  It has its own 
group (also called "www-data").  So if the mount point has these owners 
and permissions...

chown ${USER}:www-data
chmod 750

...that would do what I want, right? (owner: me, group: webserver, owner 
has rwx and group has r-x).  In other words, I don't think making a new 
group adds anything I need.


> You are suggesting the solution I offered above. I think you are on the 
> right track. With some testing you will get there.

Thanks.  I'll let you know if I get it.  Also, I guess you are working on 
udev, so let me know if you figure it out.  It seems like the udev rules 
have numbers that determine how early in the boot process they are 
implemented.  Example subset:

$ ls -l /lib/udev/rules.d/*usb*
-rw-r--r-- 1 root root   552 Apr 21  2017 /lib/udev/rules.d/39-usbmuxd.rules
-rw-r--r-- 1 root root   998 Sep 15  2017 /lib/udev/rules.d/40-usb-media-players.rules
-rw-r--r-- 1 root root 40871 Feb 23 13:56 /lib/udev/rules.d/40-usb_modeswitch.rules
-rw-r--r-- 1 root root   292 Jan 16  2018 /lib/udev/rules.d/55-ippusbxd.rules
-rw-r--r-- 1 root root   692 Jun 22 07:55 /lib/udev/rules.d/73-usb-net-by-mac.rules
-rw-r--r-- 1 root root  8126 Apr 24 06:06 /lib/udev/rules.d/77-mm-usb-device-blacklist.rules
-rw-r--r-- 1 root root  2452 Apr 24 06:06 /lib/udev/rules.d/77-mm-usb-serial-adapters-greylist.rules

So the fix I need might be as simple as finding the right rule, changing 
the number to a lower value and hardcoding user and group.

Thanks again, Iznogoud!

Mike