I want to set up a cross platform mail client (Thunderbird), and so far I want to use NAS as a profile store.
The NAS is CIFS based, and can be mounted on both Windows and Ubuntu. Also the locking works fine for mutex, and setup seems to work as a proof of concept.
The problem is the Linux mount.
Since I'm using a laptop, I'm not always connected to network, hence, I can't use the /etc/fstab to set up CIFS share with a modified group id. And the share has to be mounted using mount -t cifs ..., which causes it to be owned by root, and owned so badly, that it can't be chowned to the regular user account.
This causes read only issues for Thunderbird, which seem to be solved if Thunderbird is launched via sudo.
But I would like to avoid that and use a script to mount the share on-demand to a profile location, with profile based privileges and access rights.
Is there a way to achieve that?