I have a few containers running on Proxmox and have a challenge with a Bind mount vs a Samba share.
Container 101 has a directory shared via Samba (it's effectively my NAS). Anything written to it via Samba adopts file ownership & permissions determined by the samba process / config.
That same directory is also mounted via a bind mount (set up from the PVE host) by another container - container 102, because I can't get it to mount via CIFS / samba - but any files written via this bind mount have different ownership and permissions.
I thought about having a cron job to chown + chmod such files, but that seems very messy. Is there a good way to force files coming in via that bind mount to assume the desired ownership / permissions - i.e. same as how Samba files appear?
Container 101 has a directory shared via Samba (it's effectively my NAS). Anything written to it via Samba adopts file ownership & permissions determined by the samba process / config.
That same directory is also mounted via a bind mount (set up from the PVE host) by another container - container 102, because I can't get it to mount via CIFS / samba - but any files written via this bind mount have different ownership and permissions.
I thought about having a cron job to chown + chmod such files, but that seems very messy. Is there a good way to force files coming in via that bind mount to assume the desired ownership / permissions - i.e. same as how Samba files appear?