On Fri, 4 Sep 2020 13:37:07 -0400
rhkra...@gmail.com wrote:

> Is there a simple way to have the mounted filesystem be owned by the
> user that mounts it?

Have the user execute an appropriate script, and get the uid and gid
from the environment:

uid=$(grep ${USER} /etc/passwd | cut -d: -f 3)
gid=$(grep ${USER} /etc/passwd | cut -d: -f 4)

mount -o uid=${uid},gid=${gid} ....


> 
> (I know something about the -o uid and -o gid options, but (1) that
> would only work for one specific uid,

Right. So determine them as the user mounts it.

Alternatively, do all backups as root, and mount the file system as
root. Root is for system stuff, such as backups.


-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

Reply via email to